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

# getactorfromthread

> Trả về Actor Instance liên kết với Luau thread. Argument đầu tiên phải là thread. Function đọc thread data của thread, yêu cầu Actor reference và positive container count, rồi đọc the associated Actor. Nếu actor weak reference hợp lệ, nó được push dưới dạng Instance; nếu không function trả về nil.

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

  ## Alias

  * `getactorfromstate`

  ## Đối số

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread có thread data cần được kiểm tra để tìm associated Actor weak reference.
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance được resolve từ the associated Actor weak reference của thread, hoặc nil khi không có valid actor reference.
  </ResponseField>

  ## Ví dụ

  Resolve the Actor Instance associated with a Luau thread, when that thread has a valid actor reference.

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