readPrivateRoom
readPrivateRoom(
world):PrivateRoom|null
The private room this room runs, read the same in the room and on each
page, from before any player joins to the room’s end: a room a new
link left behind, and a fresh room a teleport took the private room
to, read it too. Null in a public room, in a fresh room a public room’s
teleport made private to its group, and in a game played alone. Roblox
reads PrivateServerOwnerId.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
Returns
Section titled “Returns”PrivateRoom | null
Example
Section titled “Example”const owner = readPrivateRoom(world)?.ownerPlayerId; if (owner === readPlayerId(player)) startMatch(step);