> ## 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

> Gibt eine array table von live Actor Instances zurück, die aus der ScriptContext actor thread list aufgelöst werden. Die function nimmt keine arguments. Sie läuft durch die actor thread list, entschlüsselt jeden actor Lua state, behält entries, die valid threads sind, und liest dann den thread data und die the associated Actor weak reference jedes thread. Nur non-expired actor references werden als Instances gepusht. Entries ohne container, ohne Actor reference, mit reference count <= 0 oder mit expired actor reference werden übersprungen.

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

  ## Rückgaben

  <ResponseField name={"actors"} type={"{Instance}"}>
    Array table von Actor Instances, deren actor weak references noch valid sind.
  </ResponseField>

  ## Beispiel

  List live Actor Instances resolved from actor threads.

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