Skip to content

Player:GetId

Read id for this player.

player:GetId()

Inputs: None beyond the Player receiver.

Output: Integer. Player ID, or -1 when the validated ID contract or live player is unavailable.

Errors and unavailable states: A wrong receiver can raise a Lua argument error. No separate error result is returned; do not treat the documented fallback as a confirmed game value.

See Lua values and game objects for lifetime and enum guidance.