Syntax
setrawmetatable(target: any, value: any): anyAliases
debug.setmetatableArguments
| Name | Type | Description |
|---|---|---|
target | any | Target function, table, stack level, or object being inspected or changed. |
value | any | New value to write. |
Returns
| Name | Type | Description |
|---|---|---|
target | any | The target value after its metatable is changed. |
Description
Sets the raw metatable for a target value and returns the target.
Call it with 2 parameter(s): target, value. The argument table explains which values are required and which ones only refine the behavior.
It returns target (any). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = setrawmetatable(nil, nil)
print(result)