getnamecallmethod Synchronous

  • get_namecall_method

Read the method name associated with the current Roblox namecall. It is most useful inside a __namecall hook where the same metamethod handles many method names.

Syntax
Luau
getnamecallmethod() -> string?

Parameters

This function takes no arguments.

Returns

string?

The current method name as a string, or nil when there is no namecall context.

Usage notes

Outside a namecall the result may be nil; do not assume a method name is always present.

Example

Example
Luau
local method = getnamecallmethod()
if method then
    print("Current namecall:", method)
end
Kawaii documentation