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

# getactorthreads

> 返回来自 actor thread list 的 Luau threads array table。该 function 不接受 arguments。它从 ScriptContext 读取 actor list bounds，遍历每个 actor state entry，将 stored global state 解密为 Luau thread，并且只包含 valid threads 的 entries。

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

  ## 别名

  * `getactorstates`

  ## 返回值

  <ResponseField name={"threads"} type={"{thread}"}>
    作为 Luau threads push 的 actor Luau thread values 的 array table。
  </ResponseField>

  ## 示例

  List Luau threads from the ScriptContext actor state list.

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