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

> Mengembalikan Actor Instance yang terkait dengan Luau thread. Argument pertama harus thread. Function membaca thread data milik thread, membutuhkan Actor reference dan positive container count, lalu membaca the associated Actor. Jika actor weak reference valid, nilainya di-push sebagai Instance; jika tidak, function mengembalikan nil.

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

  ## Alias

  * `getactorfromstate`

  ## Argumen

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread yang thread data-nya harus diperiksa untuk associated Actor weak reference.
  </ParamField>

  ## Return

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance yang di-resolve dari the associated Actor weak reference milik thread, atau nil saat tidak ada valid actor reference.
  </ResponseField>

  ## Contoh

  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>
