Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

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.

Parameter Type
world World

PrivateRoom | null

const owner = readPrivateRoom(world)?.ownerPlayerId;
if (owner === readPlayerId(player)) startMatch(step);