AcediaDocumentation

setrawmetatable

Sets an object's metatable without honoring its lock.

Returns the original value. Primitive type metatables are shared; the primitive-type path requires a non-nil metatable and an existing shared slot.

setrawmetatable(value: any, metatable: table?): any

Parameters

ParameterTypeDescription
valueanyUsually a table or userdata.
metatabletable?New metatable, or nil to remove an object metatable.

Aliases: debug.setmetatable.

On this page