Yuari
Documentation
Docs/Metatables/setnamecallmethod

setnamecallmethod

Sets the current namecall method for the active metamethod call.

Syntax

setnamecallmethod(method: string) -> nil

Parameters

ParameterTypeDescription
methodstringThe method value used by the call.

Returns

TypeDescription
nilThis function does not return a value.

Description

setnamecallmethod is part of the Metatables library. Metatable helpers operate below normal Lua protection: they read raw metatables, replace metamethods and inspect namecalls.

The change is applied directly to the live target, so later reads observe the updated value.

Example

hookmetamethod(game, "__namecall", function(self, ...)
    setnamecallmethod("Custom")
    return self
end)

Notes

  • Metatable changes are applied directly to the live object.