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

> Zwraca Actor Instance powiązaną z Luau thread. Pierwszy argument musi być thread. Function odczytuje thread data wątku, wymaga Actor reference oraz positive container count, a następnie odczytuje the associated Actor. Jeśli actor weak reference jest poprawna, zostaje wypchnięta jako Instance; w przeciwnym razie function zwraca nil.

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

  ## Aliasy

  * `getactorfromstate`

  ## Argumenty

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread, którego thread data ma zostać sprawdzony pod kątem associated Actor weak reference.
  </ParamField>

  ## Zwroty

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance rozwiązana z the associated Actor weak reference wątku, albo nil, gdy nie ma valid actor reference.
  </ResponseField>

  ## Przykład

  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>
