Player
| Property | Type | Writable | Description |
|---|---|---|---|
CustomData | ManagedLuaTable | Read-only | Managed table for storing data on this player. |
IdleTime | number | Read-only | Seconds since the server last received input from this player. |
UserId | string | Read-only | Unique identifier for this player. |
LocaleString | string | Read-only | Locale tag of this player, e.g. "en_US". |
LanguageString | string | Read-only | Language tag of this player, e.g. "en". |
ControlledEntity | Writable | Entity controlled by this player or nil.null | |
CameraEntity | Writable | Entity backing this player's vision or nil.null |
| Function |
|---|
SetCameraToFollowControlledEntity() |
Sets the camera to follow the player's controlled entity. |
SetCameraToFollowTarget() |
Sets the camera to follow the player's camera target entity. |
SetCameraToCoordinate(dimension: Dimension, x: number, y: number, z: number) |
Sets the camera to focus on a specific coordinate in a dimension. |
Ref(): LuaReference |
Gets a safe reference to this player that provides access to a player without the risk of memory leaks.
Player references are backed by the player id. If a player rejoins under a new session, the reference will
update to point to their new Player object. |