getactors
Gets all actors in the game.
Syntax
getactors() -> {Actor}Aliases
get_actors
Returns
| Type | Description |
|---|---|
{Actor} | Array of all actors in the game |
Description
getactors returns all Actor instances currently in the game. This is useful for discovering available actors to run code on.
Example
local actors = getactors()
print("Total actors:", #actors)
for i, actor in ipairs(actors) do
print(i, actor:GetFullName())
endRelated Functions
run_on_actor- Run code on an actorisparallel- Check if running in parallel