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

> Renvoie l'Actor Instance associée à un Luau thread. Le premier argument doit être un thread. L'function lit le thread data du thread, exige Actor reference et un positive container count, puis lit the associated Actor. Si l'actor weak reference est valide, elle est poussée comme Instance; sinon la function renvoie nil.

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

  ## Alias

  * `getactorfromstate`

  ## Arguments

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread dont le thread data doit être vérifié pour une associated Actor weak reference.
  </ParamField>

  ## Retours

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance résolue depuis la the associated Actor weak reference du thread, ou nil lorsqu'aucune valid actor reference n'est présente.
  </ResponseField>

  ## Exemple

  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>
