getnamecallmethod
This function returns the active __namecall method, whether or not that metamethod is hooked. It returns nil when no namecall method is available.
getnamecallmethod returns the name of the method that invoked the __namecall metamethod.
It retrieves the method being called (e.g. InvokeServer) from the current __namecall invocation. This works both in a normal __namecall metamethod and in a hookmetamethod hook targeting __namecall.
When no namecall method is available, this function will safely return nil.
Parameters
| Parameter | Description |
|---|---|
| (none) | This function takes no parameters. |
Example
| Disallowing the usage of game:service() | |
|---|---|