Skip to content

GetPlayerData

A value stored on the player with SetPlayerData.

GetPlayerData(pid, key)
Parameter Type
pid number the player
key string the key

any - the value; nil when unset or not connected

local team = GetPlayerData(pid, "team") or "red"

SetPlayerData · the Storage and persistence group of the index