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

> ScriptContext actor thread list에서 resolve된 live Actor Instances의 array table을 반환합니다. 이 function은 arguments를 받지 않습니다. actor thread list를 순회하고 각 actor Lua state를 복호화하며 valid threads인 entries를 유지한 다음 각 thread의 thread data와 the associated Actor weak reference를 읽습니다. non-expired actor references만 Instances로 push됩니다. container가 없거나 Actor reference가 없거나 reference count <= 0이거나 expired actor reference가 있는 entries는 건너뜁니다.

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

  ## 반환값

  <ResponseField name={"actors"} type={"{Instance}"}>
    actor weak references가 아직 valid인 Actor Instances의 array table입니다.
  </ResponseField>

  ## 예제

  List live Actor Instances resolved from actor threads.

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