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

> Возвращает array table live Actor Instances, полученных из ScriptContext actor thread list. Function не принимает arguments. Она проходит actor thread list, расшифровывает каждый actor Lua state, оставляет entries, которые являются valid threads, затем читает thread data и the associated Actor weak reference каждого thread. Только non-expired actor references push как Instances. Entries без container, без Actor reference, с reference count <= 0 или с expired actor reference пропускаются.

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

  ## Возвраты

  <ResponseField name={"actors"} type={"{Instance}"}>
    Array table Actor Instances, у которых actor weak references все еще valid.
  </ResponseField>

  ## Пример

  List live Actor Instances resolved from actor threads.

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