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

> Trả về array table gồm live Actor Instances được resolve từ ScriptContext actor thread list. Function không nhận arguments. Nó đi qua actor thread list, decrypt từng actor Lua state, giữ entries là valid threads, rồi đọc thread data và the associated Actor weak reference của từng thread. Chỉ non-expired actor references được push dưới dạng Instances. Entries không có container, không có Actor reference, có reference count <= 0 hoặc có expired actor reference sẽ bị bỏ qua.

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

  ## Giá trị trả về

  <ResponseField name={"actors"} type={"{Instance}"}>
    Array table gồm Actor Instances có actor weak references vẫn valid.
  </ResponseField>

  ## Ví dụ

  List live Actor Instances resolved from actor threads.

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