> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getactors

> Returns an array table of live Actor Instances resolved from the ScriptContext actor thread list. The function takes no arguments. It walks the actor thread list, decrypts each actor Lua state, keeps entries that are valid threads, then reads each thread's thread data and the associated Actor weak reference. Only non-expired actor references are pushed as Instances. Entries without a container, without Actor reference, with reference count <= 0, or with an expired actor reference are skipped.

<div className="real-function-page">
  ```lua theme={null}
  getactors(): {Instance}
  ```

  ## Returns

  <ResponseField name={"actors"} type={"{Instance}"}>
    Array table of Actor Instances whose actor weak references are still valid.
  </ResponseField>

  ## Example

  List live Actor Instances resolved from actor threads.

  ```lua theme={null}
  for _, actor in ipairs(getactors()) do
      print(actor)
  end
  ```
</div>
