Skip to content
Saiko

getnamecallmethod

Inside a __namecall hook, returns the name of the method being called.

Signature

luau
getnamecallmethod(): string

Returns

string

Example

luau
local old
old = hookmetamethod(game, "__namecall", function(self, ...)
    local method = getnamecallmethod()
    if method == "FireServer" then
        print("blocked", self:GetFullName())
        return
    end
    return old(self, ...)
end)