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

> Возвращает Actor Instance, связанную с Luau thread. Первый argument должен быть thread. Function читает thread data потока, требует Actor reference и positive container count, затем читает the associated Actor. Если actor weak reference действительна, она push как Instance; иначе function возвращает nil.

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

  ## Алиасы

  * `getactorfromstate`

  ## Аргументы

  <ParamField path={"thread"} type={"thread"} required>
    Luau thread, чей thread data нужно проверить на associated Actor weak reference.
  </ParamField>

  ## Возвраты

  <ResponseField name={"actor"} type={"Instance | nil"}>
    Actor Instance, полученная из the associated Actor weak reference потока, или nil, если valid actor reference отсутствует.
  </ResponseField>

  ## Пример

  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>
