getrawmetatable
Reads an object's real metatable.
Syntax
Signature
getrawmetatable(Object: any) -> table?Aliases
This function has no aliases.
Parameters
| Parameter | Type | Description |
|---|---|---|
Object | any | Value whose metatable should be read. |
Returns
| Type | Description |
|---|---|
table? | Actual metatable, or nil. |
Notes
Returns nil if Object has no metatable.
Example
Luau
local Object = setmetatable({}, {__metatable = "Locked"})
assert(type(getrawmetatable(Object)) == "table")