Skip to content
Scripts & runtimeOverview

getcallingscript

Identifies script metadata associated with the caller.

Details#

Returns script metadata associated with the current caller, or nil if no associated script is available. A module-created chunk need not have a script object.

Examples#

Example

Luau
local caller = getcallingscript()
print(caller and caller.Name or "No associated script")