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

> current Luau thread object に保存されている script を返します。この function は arguments を受け取りません。stored reference である the current thread script を読み取ります。その stored reference が expired ではない場合、function は Instance cache で script Instance を push して返します。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"}>
    current Luau thread object stored reference からの Script Instance。その stored reference が expired の場合は nil。
  </ResponseField>
</div>
