getnamecallmethod
This function must be called from within a __namecall
metatable hook, otherwise it will return nil
.
getnamecallmethod
returns the name of the method that invoked the __namecall
metamethod.
When used inside a hookmetamethod
hook targeting __namecall
, it will attempt to retrieve the method being called (e.g. InvokeServer
).
When used outside of said hook, this function will safely return nil
.
Parameters
Parameter | Description |
---|---|
(none) | This function takes no parameters. |
Example
Disallowing the usage of game:service() | |
---|---|