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

> Returns the Script Instance associated with the current Luau thread, or nil when no script is associated with it.

Returns the Script Instance associated with the current Luau thread, or nil when no script is associated with it.

## Syntax

```lua theme={null}
getcallingscript(): Instance | nil
```

## Returns

| Name     | Type              | Description                                                      |
| -------- | ----------------- | ---------------------------------------------------------------- |
| `script` | `Instance \| nil` | Script Instance associated with the current Luau thread, or nil. |
