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

> Retorna a Actor Instance associada a um Luau thread. O primeiro argument deve ser thread. A function lê o thread data do thread, exige Actor reference e um positive container count, então lê the associated Actor. Se a actor weak reference for válida, ela é enviada como Instance; caso contrário a function retorna nil.

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

  ## Aliases

  * `getactorfromstate`

  ## Argumentos

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread cujo thread data deve ser verificado para uma associated Actor weak reference.
  </ParamField>

  ## Retornos

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance resolvida a partir da the associated Actor weak reference do thread, ou nil quando não há valid actor reference.
  </ResponseField>

  ## Exemplo

  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>
