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

> Tra ve script duoc luu tren current Luau thread object. Function khong nhan arguments. No doc the current thread script, la mot stored reference. Neu stored reference do chua expired, function push script Instance bang Instance cache va tra ve no. Neu stored reference expired, function tra ve nil. Function khong kiem tra Lua call stack, khong tim ancestor scripts, va khong kiem tra script ClassName.

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

  ## Giá trị trả về

  <ResponseField name={"script"} type={"Instance | nil"}>
    Script Instance tu current Luau thread object stored reference, hoac nil khi stored reference do expired.
  </ResponseField>
</div>
