PlayWaveServer.isPcCafeUser(player) so you can verify that session state and PC cafe detection are wired up correctly.
Install
Code walkthrough
game:GetService("...")
The standard way to access Roblox built-in services. Players manages connected players; ServerScriptService is the container for server-side scripts.
ServerScriptService:WaitForChild("PlayWaveSetup")
Looks for a child of ServerScriptService named PlayWaveSetup. If it does not exist yet, waits until it appears.
Why WaitForChild instead of ServerScriptService.PlayWaveSetup:
- Scripts under
ServerScriptServicestart executing in parallel and load order is not guaranteed. - If this debug script runs before
PlayWaveSetup, thePlayWaveSetupinstance may not be in the tree yet. .direct access → errors immediately if the child is missing.:WaitForChild()→ yields until it exists.
require(ModuleScript)
Roblox’s module loader. The target must be a ModuleScript, and:
- On the first call → runs the script once and caches the value returned via
return. - On later calls → returns the same cached value without re-running the script.
activeSessions populated by init() in PlayWaveSetup.
PlayWaveSetup:WaitForChild("PlayWaveServer")
Waits for the PlayWaveServer ModuleScript nested under the PlayWaveSetup Script. The actual tree:
while true do ... task.wait(3) end
Infinite loop that yields every 3 seconds via task.wait(3). Without task.wait, a bare while true blocks the server scheduler, freezing every other script and event.
Players:GetPlayers()
Returns an array of currently connected Player instances. #players is the array length.
Run
Press Play in Studio and watch the Output window — a log line prints every 3 seconds.Expected output
Server only (no players)
Right after a player joins (before OTT verify)
false.
After OTT verify completes (regular user)
false.
After OTT verify completes (PC cafe user)
true and stay there. A [PlayWave] PC cafe detected log line appears alongside.
Teleported into a subplace
TeleportData and applied immediately.
Troubleshooting
attempt to call a nil value
attempt to call a nil value
PlayWaveServer.isPcCafeUser does not exist on the module. Your SDK is out of date.Fix:- Overwrite the plugin file with the latest
PlayWavePlugin.plugin:- macOS:
~/Documents/Roblox/Plugins/ - Windows:
%LOCALAPPDATA%/Roblox/Plugins/
- macOS:
- Restart Studio.
- Run PlayWave Setup → Install SDK again from the toolbar.
Infinite yield possible on WaitForChild('PlayWaveSetup')
Infinite yield possible on WaitForChild('PlayWaveSetup')
WaitForChild waited more than 5 seconds without finding the target. The SDK is not installed. Run Install SDK from the toolbar.Always returns false (testing as a regular user)
Always returns false (testing as a regular user)
Working as intended. PC cafe detection only flips to
true when the player joins through the PlayWave launcher in a PC cafe environment.[PlayWave] No OTT found, skipping verify warning
[PlayWave] No OTT found, skipping verify warning
The player joined without going through the PlayWave launcher. No session is created for this user, so
isPcCafeUser always returns false. This is expected.Notes
- Adjust the cadence by changing
task.wait(3)at the top of the script.
Related API
PlayWaveServer.isPcCafeUser(player)— returns a boolean. Returnsfalseif no session exists.PlayWaveServer.init({ onPcCafe = function(player) ... end })— callback invoked once when a PC cafe user joins. Prefer this over polling if you want to grant rewards on join.