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

readLocalPlayer

readLocalPlayer(world): PlayerEntity | undefined

This side’s player: on a page in a room, the one her welcome named, under the client’s authority; in a game played alone, its one person’s, never a bot. Undefined before either exists, and on a room’s own world, which holds every player and is none of them. As Roblox’s Players.LocalPlayer; usePlayer() reads it in a component.

Parameter Type
world World

PlayerEntity | undefined