Skip to main content
Returns the name of the method being called: for player:Kick(), that is "Kick".
Only __namecall produces this; no other metamethod does.
Most commonly paired with hookmetamethod to read the method name and decide whether to block, log, or redirect that specific call.

Returns

string? - the method name as a string when called from inside a __namecall metamethod, otherwise nil.

Example

Pick any Roblox game, where a LocalScript (or a ModuleScript) triggers a :Kick() on the LocalPlayer - detect the Kick namecall, and silence it before it executes.
Only valid when called inside a custom __namecall metamethod callback.