Skip to main content
Returns the metatable currently attached to a target value, or nil when none is present. The function returns exactly one value and does not change the target. debug.getmethods is an alias for getrawmethods.

Syntax

Aliases

  • debug.getmetatable

Arguments

Returns

Example

Return the metatable currently attached to a value.