> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Metatables

> メタテーブル、メタフィールド、および名前呼び出しメソッド。

<div className="real-category-page">
  メタテーブル、メタフィールド、および名前呼び出しメソッド。

  ## 利用できる関数

  <CardGroup cols={2}>
    <Card title="getmetafield" href="./getmetafield">
      Returns a raw metafield value from the target metatable. target may be any value, and field must be a string. The function does not call the metafield, does not invoke \_\_index lookup, and returns nil when the metatable or field is missing.
    </Card>

    <Card title="getnamecallmethod" href="./getnamecallmethod">
      the current namecall method に保存されている current Luau namecall atom を返します。この function は arguments を取らず、exactly one value を返します。the current namecall method が存在し、the current namecall method が 0 より大きく、the current namecall method が non-null の場合、その data を string return で string として push します。それ以外の場合は nil を push します。function は arguments を検査せず、target object から method name を計算せず、metamethod を呼び出しません。get\_namecall\_method は getnamecallmethod の alias です。
    </Card>

    <Card title="getrawmetatable" href="./getrawmetatable">
      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.
    </Card>

    <Card title="hasmetafield" href="./hasmetafield">
      Returns whether the target value has a non-nil raw metafield with the requested name. The function does not call the metafield, does not invoke \_\_index lookup, and does not change readonly state.
    </Card>

    <Card title="hasmetatable" href="./hasmetatable">
      Returns whether the target value has a metatable. The function returns one boolean and does not return or change the metatable itself.
    </Card>

    <Card title="isreadonly" href="./isreadonly">
      Returns whether a table is readonly. The argument must be a table, and the function does not change it.
    </Card>

    <Card title="makereadonly" href="./makereadonly">
      Marks a table as readonly and returns no values.
    </Card>

    <Card title="makewriteable" href="./makewriteable">
      Marks a table as writable and returns no values.
    </Card>

    <Card title="setnamecallmethod" href="./setnamecallmethod">
      Replaces the current namecall method string when a current namecall method exists. The method argument must be a string. If no current namecall method exists, the call returns no values and does not create one. set\_namecall\_method is an alias.
    </Card>

    <Card title="setrawmetatable" href="./setrawmetatable">
      Sets the metatable for a target value and returns the original target. metatable must be a table or nil; nil clears the metatable. debug.setmethods is an alias for setrawmethods.
    </Card>

    <Card title="setreadonly" href="./setreadonly">
      Sets whether a table is readonly and returns no values.
    </Card>
  </CardGroup>
</div>
