> ## 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. يجب أن يكون الوسيط الأول thread. تقرأ function الـ thread data للthread، وتتطلب 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 الخاصة بالthread، أو 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>
