Volt

getactors

Gets all actors in the game.

Syntax

getactors() -> {Actor}

Aliases

  • get_actors

Returns

TypeDescription
{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())
end

On this page