Yuari
Documentation
Docs/Actors/getactors

getactors() / getactorthreads() / get_actor_threads()

getactors lists Actor instances; getactorthreads returns threads bound to actors.

Syntax

getactors() -> {Instance}
getactorthreads() -> {thread}

Parameters

No parameters.

Returns

TypeDescription
{Instance}Actor instances (getactors).
{thread}Live threads carrying an actor reference (getactorthreads).

Description

getactors walks game descendants and collects Actor instances.

Logic change: getactorthreads no longer aliases getactors. It walks the GC heap and returns thread objects whose extra space references an Actor, excluding ordinary threads. The actor's own thread and task.spawn/task.defer children are included when they carry the actor.

Example

local actor = Instance.new("Actor")
actor.Parent = workspace
runonactor(actor, "")
for _, thread in getactorthreads() do print(typeof(thread)) end