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

# getcallingscript

> يرجع script المخزن على current Luau thread object. لا تقبل function أي arguments. تقرأ the current thread script، وهي stored reference. إذا لم يكن هذا stored reference expired، تدفع function قيمة script Instance باستخدام Instance cache وترجعها. إذا كان stored reference expired، ترجع function nil. لا تفحص function الـ Lua call stack، ولا تبحث في ancestor scripts، ولا تتحقق من script ClassName.

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

  ## القيم الراجعة

  <ResponseField name={"script"} type={"Instance | nil"}>
    Script Instance من current Luau thread object stored reference، أو nil عندما يكون ذلك stored reference expired.
  </ResponseField>
</div>
