Skip to main content

Aliases

  • debug.setmetatable

Arguments

any
required
Value whose metatable is changed.
table | nil
required
New metatable, or nil to clear the metatable. Other types raise “nil or table”.

Returns

any
The original target value.

ตัวอย่าง

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