Skip to content

entities.GetByIndex

Get the entity by its index.

Syntax

userdata entities.GetByIndex(int:index)

Parameters

index Index of the entity.

Return value

The function returns the userdata of an entity by its index.

Example

local RandomPlayer = entities.GetByIndex(3);