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

> Luau thread に関連付けられた Actor Instance を返します。最初の argument は thread である必要があります。function は thread の thread data を読み取り、Actor reference と positive container count を要求し、その後 the associated Actor を読み取ります。actor weak reference が有効な場合は Instance として push され、それ以外の場合は function が nil を返します。

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

  ## エイリアス

  * `getactorfromstate`

  ## 引数

  <ParamField path={"thread"} type={"thread"} required>
    associated Actor weak reference を確認する thread data を持つ Luau thread。
  </ParamField>

  ## 戻り値

  <ResponseField name={"actor"} type={"Instance | nil"}>
    thread の the associated Actor weak reference から解決された Actor Instance、または valid actor reference がない場合は nil。
  </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>
