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

# Reflection

> Reflexionshelfer für Instanzen und Eigenschaften.

<div className="real-category-page">
  Reflexionshelfer für Instanzen und Eigenschaften.

  ## Verfügbare Funktionen

  <CardGroup cols={2}>
    <Card title="gethiddenproperty" href="./gethiddenproperty">
      Liest eine Roblox property ueber reflection metadata, einschliesslich non-scriptable properties. Das erste Argument muss Instance object sein und das zweite Argument muss ein string property name sein. Der instance reference muss gueltig sein. Wenn der property descriptor in Roblox property metadata fehlt, gibt die function nur nil zurueck. Wenn der descriptor existiert, aber nicht zu einem property entry aufgeloest wird, wirft sie "Not a property". Fuer die reflection types Bool, Int, Float, Double, String, SystemAddress, SharedString und Vector3 ruft die function den getter auf und gibt den value plus ein boolean gleich !IsScriptable() zurueck. SystemAddress gibt RemoteId.PeerId als integer zurueck. SharedString gibt Content als string zurueck. Vector3 liest aus dem instance primitive Size offset und wirft "can't get value", wenn der touch data fehlt. Andere property types werden ueber normal Lua field access gelesen, nachdem das property scriptable flag temporaer auf true gesetzt wurde; BinaryString wird fuer diesen Lesevorgang temporaer als String behandelt. Das original scriptable flag und der BinaryString type werden vor dem Return wiederhergestellt.
    </Card>

    <Card title="isscriptable" href="./isscriptable">
      Prueft das scriptable flag einer Roblox property auf einer Instance. Die function gibt zuerst einen gecachten scriptable-Wert zurueck, wenn einer fuer denselben instance reference und property name existiert. Bei einem Cache-Miss wird der property name ueber Roblox property metadata und den Instance class descriptor aufgeloest. Wenn kein descriptor existiert oder das aufgeloeste field fehlt oder kein property entry ist, gibt die function nil zurueck. Wenn ein property entry gefunden wird, liest sie scriptable state, speichert diesen Wert im scriptable override cache fuer die Instance und property und gibt den boolean zurueck. Die function aendert das scriptable flag nicht.
    </Card>

    <Card title="sethiddenproperty" href="./sethiddenproperty">
      Sets a Roblox property with reflection metadata. The first argument must be Instance object, the second argument must be a string property name, and the third argument must be present. The instance reference must be valid. If the property descriptor is missing from Roblox property metadata, the function returns nil. If the descriptor exists but does not resolve to a property entry, it raises "Not a property". Bool values use luaL\_checkboolean. Int and SystemAddress values use integer type checking, with SystemAddress writing RemoteId.PeerId. Float and Double values use number type checking. String, SharedString, and BinaryString values use string type checking before calling the setter. For other property types, the function temporarily calls setscriptable(instance, property, true), assigns instance\[property] = value with normal Lua field assignment, then restores the original scriptable state with setscriptable(instance, property, isScriptable). On successful writes, the return value is a boolean equal to !IsScriptable() from before the write.
    </Card>

    <Card title="setscriptable" href="./setscriptable">
      Speichert einen scriptable override fuer eine Roblox property im scriptable override cache und gibt den previous scriptable state zurueck. Das erste Argument muss Instance object sein, das zweite Argument muss ein string property name sein, und das dritte Argument muss boolean sein. Wenn bereits ein cache entry fuer denselben instance reference und property name existiert, wird der cached scriptable value ersetzt und der alte cached value zurueckgegeben. Bei einem cache miss wird der property name ueber Roblox property metadata und den Instance class descriptor aufgeloest. Wenn kein descriptor existiert oder das aufgeloeste field fehlt oder kein property entry ist, gibt die function nil zurueck. Wenn ein property entry gefunden wird, liest die function scriptable state, speichert den gewuenschten boolean plus property reference im scriptable override cache und gibt den previous scriptable state value zurueck. GameIndexHook und GameNewIndexHook verwenden diesen cache spaeter, indem sie das property field scriptable flag fuer einen einzelnen indexed read oder write temporaer setzen und danach den previous field flag wiederherstellen.
    </Card>
  </CardGroup>
</div>
