GetPlayerBody
getPlayerBody
Returns a player's authoritative full-body identity preset.
Syntax
string|false getPlayerBody(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns the stable body key, or false when the player is invalid or appearance state is unavailable.
Examples
Read a player's body preset:
local bodyKey = getPlayerBody(playerId)
if bodyKey then
outputDebugString("Body: " .. bodyKey)
end
Notes
- Available only in server-side resource scripts.
- The returned state is server-authoritative and late-join safe.