Skip to content

Player:GetObjectsByTypes

Read objects by types for this player.

player:GetObjectsByTypes(types[, ...])

Inputs: types is optional a dense array of integer object type IDs; more integer type IDs may follow.

Output: Object array. Objects matching any supplied type.

Errors and unavailable states: A wrong receiver or argument type can raise a Lua argument error. No separate error result is returned. Query live state again when the entity may have changed.

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