Syntax
getcallingscript(): Instance | nilReturns
| Name | Type | Description |
|---|---|---|
script | Instance | nil | Script instance associated with the context, or nil. |
Description
Returns the script associated with the current calling context.
Call it without parameters. The function reads the needed context from the current runtime state.
It returns script (Instance | nil). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = getcallingscript()
print(result)