GetPlayerData
A value stored on the player with SetPlayerData.
Syntax
Section titled “Syntax”GetPlayerData(pid, key)| Parameter | Type | |
|---|---|---|
pid |
number | the player |
key |
string | the key |
Returns
Section titled “Returns”any - the value; nil when unset or not connected
Example
Section titled “Example”local team = GetPlayerData(pid, "team") or "red"See also
Section titled “See also”SetPlayerData · the Storage and persistence group of the index
