Scriptsgetcallingscript
Scripts

getcallingscript

Retrieves the script that triggered the current execution.

Related to sUNC documentation

This page follows the official sUNC reference.

Signature

Luau
function getcallingscript(): BaseScript | ModuleScript | nil

Returns

The calling script or nil.