IntroductionAccount ManagerDecompiler

Scripting

Closures
Debug
Reflection
Metatable
Environment
Bit
Scripts
LuaStateProxy
oth

Instances & Events

Instances
Cache
Signals
VoltSignal
Actors
create_comm_channelget_comm_channelget_current_actorgetactorsgetactorstatesgetgamestategetluastateisparallelon_actor_addedon_actor_state_createdrun_on_actor

System

Filesystem
Input
Console
Crypt
Encoding
Miscellaneous

Graphics & Network

Drawing
WebSocket
RakNet
DocsGuidesRelease Notes
Actors

getactors

Gets all active Actors.

Syntax

getactors() -> {Actor}

Returns

TypeDescription
{Actor}Array of active Actors

Description

getactors returns the Actors that are currently active.

Example

local actors = getactors()
print("Total actors:", #actors)

for i, actor in ipairs(actors) do
    print(i, actor:GetFullName())
end

Related Functions

  • run_on_actor - Run code on an actor
  • isparallel - Check if running in parallel

get_current_actor

Previous Page

getactorstates

Next Page

On this page

SyntaxReturnsDescriptionExampleRelated Functions