readRoomId
readRoomId(
world):RoomId|null
The room’s own id, which teleportPlayers takes as { roomId }, such
as a lobby’s id it hands its match for the trip back; null on a page,
in a game played alone, and in the game’s start, which runs before
the room knows its id: read it from the first step on, as every join
hook and system does.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
world |
World |
Returns
Section titled “Returns”RoomId | null
Example
Section titled “Example”const lobby = readRoomId(step.world);