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

> Gibt das script zurueck, das auf dem current Luau thread object gespeichert ist. Die function akzeptiert keine arguments. Sie liest the current thread script, einen stored reference. Wenn dieser stored reference nicht expired ist, pusht die function die script Instance mit Instance cache und gibt sie zurueck. Wenn der stored reference expired ist, gibt die function nil zurueck. Die function untersucht nicht den Lua call stack, sucht nicht nach ancestor scripts und prueft nicht die script ClassName.

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

  ## Rückgaben

  <ResponseField name={"script"} type={"Instance | nil"}>
    Script Instance aus dem current Luau thread object stored reference, oder nil, wenn dieser stored reference expired ist.
  </ResponseField>
</div>
