Skip to main content
Sets the metatable for a target value and returns the original target. metatable must be a table or nil; nil clears the metatable. debug.setmethods is an alias for setrawmethods.

Syntax

Aliases

  • debug.setmetatable

Arguments

Returns

Example

Set or clear a value’s metatable and receive the target back.