The server script initializes PlayWave and defines the onPcCafe callback. This callback runs when a PC cafe user is verified.
local PlayWaveServer = require(script.PlayWaveServer)local apiKey = script:WaitForChild("ApiKey").Valuelocal apiUrl = script:WaitForChild("ApiUrl").ValuePlayWaveServer.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,})
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 for details.
The client script sends a ready signal and listens for benefit events.
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.")endlocal 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
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.
Press Play to test locally. Since there’s no LaunchData, it will connect as a normal user without OTT.
2
Test with PlayWave Launcher
Launch the game through the PlayWave launcher — LaunchData will contain the OTT. Check the verification logs in the Output console.
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.
For multi-Place Experiences, billing will not apply after moving to a SubPlace without teleport integration, which can result in revenue loss.
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.
1
Update to the latest plugin
Install the latest PlayWave plugin from the Toolbox, then click Install SDK to update the scripts.
Clicking Install SDK will reset existing callback scripts. Back up your code before proceeding.
2
Install PlayWave SDK on each Place
PlayWave SDK must be installed on every SubPlace that is a teleport destination.
3
Modify the teleport logic
Update your teleport code to include PlayWave session data in TeleportOptions.