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

> Devuelve la Actor Instance asociada con un Luau thread. El primer argument debe ser thread. La function lee el thread data del thread, requiere Actor reference y un positive container count, y luego lee the associated Actor. Si la actor weak reference es válida, se hace push como Instance; de lo contrario la function devuelve nil.

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

  ## Alias

  * `getactorfromstate`

  ## Argumentos

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread cuyo thread data debe comprobarse para encontrar una associated Actor weak reference.
  </ParamField>

  ## Retornos

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance resuelta desde la the associated Actor weak reference del thread, o nil cuando no hay valid actor reference.
  </ResponseField>

  ## Ejemplo

  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>
