getcallingscript
Returns the script responsible for the current call, or nil when the executor itself is calling.
Signature
getcallingscript(): BaseScript?Returns
BaseScript?
Example
local hook
hook = hookmetamethod(game, "__namecall", function(self, ...)
if getnamecallmethod() == "FireServer" and not checkcaller() then
print("fired by", getcallingscript())
end
return hook(self, ...)
end)