> ## 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.

# gethiddenproperty

> non-scriptable properties を含め、reflection metadata 経由で Roblox property を読み取ります。最初の引数は Instance object、2 番目の引数は string property name である必要があります。instance reference は有効である必要があります。property descriptor が Roblox property metadata にない場合、この function は nil だけを返します。descriptor が存在しても property entry に解決されない場合は "Not a property" を発生させます。reflection types Bool、Int、Float、Double、String、SystemAddress、SharedString、Vector3 では getter を呼び、value と !IsScriptable() に等しい boolean を返します。SystemAddress は RemoteId.PeerId を integer として返します。SharedString は Content を string として返します。Vector3 は instance primitive Size offset から読み取り、touch data がない場合は "can't get value" を発生させます。他の property types は property scriptable flag を一時的に true にした後、normal Lua field access で読み取ります。BinaryString はその読み取り中だけ String として扱われます。original scriptable flag と BinaryString type は return 前に復元されます。

<div className="real-function-page">
  ```lua theme={null}
  gethiddenproperty(instance: Instance, property: string): any | boolean
  ```

  ## 引数

  <ParamField path={"instance"} type={"Instance"} required>
    Instance object whose property should be read. Invalid Instance values raise an argument error.
  </ParamField>

  <ParamField path={"property"} type={"string"} required>
    string property name resolved with Roblox property metadata.
  </ParamField>

  ## 戻り値

  <ResponseField name={"propertyValue"} type={"any"}>
    Property value, or nil as the only return value when no property descriptor exists.
  </ResponseField>

  <ResponseField name={"wasHidden"} type={"boolean"}>
    Second return value equal to !IsScriptable() when a property value is read.
  </ResponseField>

  ## 例

  Read a property value even when normal script access is limited.

  ```lua theme={null}
  local value, wasHidden = gethiddenproperty(workspace, "ClassName")
  print(value, wasHidden)
  ```
</div>
