GetEntityData
A value stored on an entity with SetEntityData.
Syntax
Section titled “Syntax”GetEntityData(id, key)| Parameter | Type | |
|---|---|---|
id |
number | the entity |
key |
string | the key |
Returns
Section titled “Returns”any - the value; nil when unset or no such entity
Example
Section titled “Example”function OnPlayerPickup(pid, id) local owner = GetEntityData(id, "owner") return owner == nil or owner == pidendSee also
Section titled “See also”SetEntityData · the Storage and persistence group of the index
