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

> Zwraca script zapisany na current Luau thread object. Function nie przyjmuje zadnych arguments. Odczytuje the current thread script, ktore jest stored reference. Jesli ten stored reference nie jest expired, function wypycha script Instance przez Instance cache i ja zwraca. Jesli stored reference jest expired, function zwraca nil. Function nie sprawdza Lua call stack, nie szuka ancestor scripts i nie sprawdza script ClassName.

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

  ## Zwroty

  <ResponseField name={"script"} type={"Instance | nil"}>
    Script Instance z current Luau thread object stored reference, albo nil, gdy ten stored reference jest expired.
  </ResponseField>
</div>
