> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rolearn.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Roblox Studio Plugin

> One-click RoLearn instrumentation for Roblox games — no API-key copy-paste

The RoLearn Studio plugin instruments a Roblox game in two clicks. Connect once,
then **Activate** drops the latest `RoLearnSDK` module plus a wired init script
into `ServerScriptService` — no key copy-paste, no manual file handling, and the
SDK module is always the current version.

## Install

Install from the **Roblox Creator Marketplace** (no download). You'll need a
RoLearn account first — sign up at [rolearn.dev](https://rolearn.dev), because the
connect step requires a logged-in session.

On first use Studio prompts *"RoLearn wants to access the internet"* — allow it
(the plugin needs HTTP access).

## How it works

There are two phases:

<Steps>
  <Step title="Connect (once per account)">
    A device-code handshake. The plugin shows a short code; you approve it at
    [`rolearn.dev/link`](https://rolearn.dev/link) while logged in. That binds the
    plugin to your account and returns a `plugin:session` credential (prefix
    `rlp_live_`).

    This credential is **not** an ingest key — it cannot send events or read data.
    It only lets the plugin mint an ingest key on your behalf.
  </Step>

  <Step title="Activate (per game)">
    The plugin mints a fresh `rk_live_` ingest key server-side and pulls the
    current SDK module source, then inserts `RoLearnSDK` + `RoLearnInit` into
    `ServerScriptService`. Re-activating a game revokes the previous
    plugin-minted key for it.
  </Step>
</Steps>

After Activate, publish and run your game — session events appear on the
[SDK dashboard](https://rolearn.dev/sdk/dashboard) within \~10s.

<Note>
  The plugin never handles your `.ROBLOSECURITY` cookie or any Roblox credential.
  It talks only to RoLearn's `/api/sdk/plugin/*` endpoints.
</Note>

## Manual alternative

If you'd rather not use the plugin, you can install the SDK by hand: download the
`RoLearnSDK` module, place it in `ServerScriptService` as a `ModuleScript`, and
call `SDK.init({ api_key = "rk_live_…", game_id = tostring(game.PlaceId) })`. See
the [SDK overview](/sdk/overview).
