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

# Quickstart

> Install the PlayWave Roblox plugin and start integrating in minutes

<Info>
  **Prerequisites**

  * **API Key** — contact your PlayWave operations representative to request one
  * **PlayWave Launcher (Dev build)** — request a dev build from your PlayWave operations representative for testing
  * Roblox Studio installed
</Info>

## Step 1 — Allow HTTP Requests

<Steps>
  <Step title="Open Experience Settings">
    In Roblox Studio, go to **File → Experience Settings**.

    <Frame caption="File → Experience Settings">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/experience-settings.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=45f3407bd54f866513a25cd80468be7e" alt="Roblox Studio File menu with Experience Settings highlighted" width="1086" height="1230" data-path="images/plugin/experience-settings.png" />
    </Frame>
  </Step>

  <Step title="Enable HTTP Requests">
    Click **Security** in the left menu, then toggle **Allow HTTP Requests** on.

    <Frame caption="Security → Allow HTTP Requests enabled">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/allow-http.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=a8eff3582a62a632ffa3ab0cd06e4f74" alt="Experience Settings Security tab with Allow HTTP Requests toggled on" width="1946" height="1290" data-path="images/plugin/allow-http.png" />
    </Frame>
  </Step>
</Steps>

## Step 2 — Install the PlayWave plugin

<Steps>
  <Step title="Open the Toolbox">
    Click **Toolbox** in the top-right corner of Roblox Studio. In the Toolbox panel, switch to the **Plugins** tab and search for `playwave`.

    <Frame caption="Toolbox → Plugins → search 'playwave'">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/toolbox-search.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=8cf6608f8c83df64affac34acacc0326" alt="Roblox Studio Toolbox searching for PlayWave plugin" width="2524" height="1534" data-path="images/plugin/toolbox-search.png" />
    </Frame>
  </Step>

  <Step title="Install & Update">
    Click the **PlayWave** plugin, then click **Install**.

    <Frame caption="PlayWave plugin install page">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/plugin-install.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=da766974bd4c889e17cb9e942ac9df69" alt="PlayWave plugin detail page with Install button" width="774" height="1176" data-path="images/plugin/plugin-install.png" />
    </Frame>
  </Step>
</Steps>

## Step 3 — Run PlayWave Setup

<Steps>
  <Step title="Open the Plugins menu">
    Click the **Plugins** tab in the top menu bar. You should see the **PlayWave Setup** button.

    <Frame caption="Plugins menu with PlayWave Setup button">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/plugins-menu.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=82e85a6b642da4bc3c99a7b9e31076a7" alt="Roblox Studio Plugins tab showing PlayWave Setup button" width="3012" height="1544" data-path="images/plugin/plugins-menu.png" />
    </Frame>
  </Step>

  <Step title="Configure and install">
    Click **PlayWave Setup**. Enter your **API Key**, select the **Environment**, then click **Install**.

    | Environment | Status                                    |
    | ----------- | ----------------------------------------- |
    | **Dev**     | <Badge color="green">Available</Badge>    |
    | **QA**      | <Badge color="yellow">Coming soon</Badge> |
    | **Live**    | <Badge color="yellow">Coming soon</Badge> |

    <Frame caption="PlayWave Settings dialog">
      <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/setup-dialog.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=6ecbc811096e03f309c97e3ef1c02a11" alt="PlayWave Settings dialog with API Key field and environment selection" width="666" height="570" data-path="images/plugin/setup-dialog.png" />
    </Frame>
  </Step>
</Steps>

## Step 4 — Verify the installed scripts

After installation, the following scripts are automatically created:

<Frame caption="Scripts created by the PlayWave plugin">
  <img src="https://mintcdn.com/playwave/qY2JHnQsbwElkafF/images/plugin/script-structure.png?fit=max&auto=format&n=qY2JHnQsbwElkafF&q=85&s=ae3ae7cb7779b6e47922f5380e44b1fc" alt="Roblox Studio Explorer showing PlayWaveSetup and PlayWaveClient scripts" width="542" height="526" data-path="images/plugin/script-structure.png" />
</Frame>

<Tree>
  <Tree.Folder name="ServerScriptService" defaultOpen>
    <Tree.Folder name="PlayWaveSetup" defaultOpen>
      <Tree.File name="ApiKey (StringValue)" />

      <Tree.File name="ApiUrl (StringValue)" />

      <Tree.File name="PlayWaveServer (ModuleScript)" />
    </Tree.Folder>
  </Tree.Folder>

  <Tree.Folder name="StarterPlayer" defaultOpen>
    <Tree.Folder name="StarterPlayerScripts" defaultOpen>
      <Tree.File name="PlayWaveClient (LocalScript)" />
    </Tree.Folder>
  </Tree.Folder>
</Tree>

## Step 5 — Write callback functions

### PlayWaveSetup (Server)

The server script initializes PlayWave and defines the `onPcCafe` callback. This callback runs when a PC cafe user is verified.

```lua theme={null}
local PlayWaveServer = require(script.PlayWaveServer)

local apiKey = script:WaitForChild("ApiKey").Value
local apiUrl = script:WaitForChild("ApiUrl").Value

PlayWaveServer.init({
    apiKey = apiKey,
    apiUrl = apiUrl,

    onPcCafe = function(player)
        -- Grant PC cafe benefits here (XP boost, items, coins, etc.)
        print("[PlayWave] PC cafe benefit granted:", player.Name)
    end,

    -- Optional: fires once per player when verification ends, regardless of cafe status
    onVerified = function(player, isPcCafe, reason)
        print("[PlayWave] Verified:", player.Name, isPcCafe, reason)
    end,
})
```

<Tip>
  `onPcCafe` only fires for PC cafe users. If you also need a signal for non-cafe players (e.g. to dismiss a loading state), use `onVerified` — it fires exactly once per player. See the [onVerified callback guide](/roblox/on-verified) for details.
</Tip>

### PlayWaveClient (Client)

The client script sends a ready signal and listens for benefit events.

```lua theme={null}
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local evFolder         = ReplicatedStorage:WaitForChild("PlayWaveEvents", 30)
local clientReadyEvent = evFolder and evFolder:WaitForChild("PlayWaveClientReady", 30)

if clientReadyEvent then
    clientReadyEvent:FireServer()
else
    warn("[PlayWave] PlayWaveClientReady event not found.")
end

local benefitEvent = evFolder and evFolder:WaitForChild("PlayWaveBenefit", 30)
if benefitEvent then
    benefitEvent.OnClientEvent:Connect(function(benefitType)
        if benefitType == "PC_CAFE" then
            -- Handle PC cafe benefit on client (e.g., show UI notification)
        end
    end)
end
```

<Tip>
  The `onPcCafe` callback on the server is where you grant gameplay benefits (XP boost, items, etc.). The `PlayWaveBenefit` event on the client is for UI notifications only.
</Tip>

## Step 6 — Test

<Steps>
  <Step title="Test in Roblox Studio">
    Press Play to test locally. Since there's no LaunchData, it will connect as a normal user without OTT.
  </Step>

  <Step title="Test with PlayWave Launcher">
    Launch the game through the PlayWave launcher — LaunchData will contain the OTT. Check the verification logs in the Output console.
  </Step>
</Steps>

<Note>
  Users who connect without the PlayWave launcher won't have an OTT, so verification is skipped. They can still play the game normally without PC cafe benefits.
</Note>

## Teleport integration (multi-Place) <Badge color="red">Important</Badge>

<Warning>
  For multi-Place Experiences, billing will not apply after moving to a SubPlace without teleport integration, which can result in **revenue loss**.
</Warning>

In Experiences that use a Lobby Place to teleport players into SubPlaces, PlayWave authentication is lost during the transition. You must include session data in `TeleportOptions` to maintain authentication.

<Steps>
  <Step title="Update to the latest plugin">
    Install the latest PlayWave plugin from the Toolbox, then click **Install SDK** to update the scripts.

    <Warning>
      Clicking Install SDK will reset existing callback scripts. **Back up your code before proceeding.**
    </Warning>
  </Step>

  <Step title="Install PlayWave SDK on each Place">
    PlayWave SDK must be installed on every SubPlace that is a teleport destination.
  </Step>

  <Step title="Modify the teleport logic">
    Update your teleport code to include PlayWave session data in `TeleportOptions`.

    ```lua theme={null}
    -- ServerScriptService/TeleportHandler (Script Example)
    local Players = game:GetService("Players")
    local TeleportService = game:GetService("TeleportService")
    local ReplicatedStorage = game:GetService("ReplicatedStorage")

    local SUB_PLACE_ID = 130143450994652

    local PlayWaveServer = require(
        game:GetService("ServerScriptService")
            :WaitForChild("PlayWaveSetup")
            :WaitForChild("PlayWaveServer")
    )

    local teleportEvent = Instance.new("RemoteEvent")
    teleportEvent.Name = "RequestTeleport"
    teleportEvent.Parent = ReplicatedStorage

    teleportEvent.OnServerEvent:Connect(function(player)
        local teleportOptions = Instance.new("TeleportOptions")
        PlayWaveServer.prepareForTeleport(player, teleportOptions)
        TeleportService:TeleportAsync(SUB_PLACE_ID, {player}, teleportOptions)
    end)
    ```
  </Step>
</Steps>

<Tip>
  For a detailed guide on teleport integration, see [Teleport integration guide](/roblox/teleport).
</Tip>

## Next steps

<Columns cols={2}>
  <Card title="Session lifecycle" icon="rotate" href="/roblox/session-flow">
    Understand how sessions, heartbeats, and termination work.
  </Card>

  <Card title="Manual setup" icon="code" href="/roblox/manual-setup">
    Set up PlayWave manually without the plugin.
  </Card>
</Columns>
