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

> Retorna o script armazenado no current Luau thread object. A function nao aceita arguments. Ela le the current thread script, que e um stored reference. Se esse stored reference nao estiver expired, a function faz push da script Instance com Instance cache e a retorna. Se o stored reference estiver expired, a function retorna nil. A function nao inspeciona o Lua call stack, nao procura ancestor scripts e nao verifica o script ClassName.

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

  ## Retornos

  <ResponseField name={"script"} type={"Instance | nil"}>
    Script Instance do current Luau thread object stored reference, ou nil quando esse stored reference esta expired.
  </ResponseField>
</div>
