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