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

> Ayudantes de reflexión para instancias y propiedades.

<div className="real-category-page">
  Ayudantes de reflexión para instancias y propiedades.

  ## Funciones disponibles

  <CardGroup cols={2}>
    <Card title="gethiddenproperty" href="./gethiddenproperty">
      Lee una Roblox property mediante reflection metadata, incluidas non-scriptable properties. El primer argumento debe ser Instance object y el segundo argumento debe ser un string property name. El instance reference debe ser valido. Si falta el property descriptor en Roblox property metadata, la function devuelve solo nil. Si el descriptor existe pero no se resuelve a un property entry, lanza "Not a property". Para los reflection types Bool, Int, Float, Double, String, SystemAddress, SharedString y Vector3, la function llama al getter y devuelve el value mas un boolean igual a !IsScriptable(). SystemAddress devuelve RemoteId.PeerId como integer. SharedString devuelve Content como string. Vector3 lee desde el instance primitive Size offset y lanza "can't get value" si falta el touch data. Otros property types se leen mediante normal Lua field access despues de establecer temporalmente el property scriptable flag en true; BinaryString se trata temporalmente como String para esa lectura. El original scriptable flag y el BinaryString type se restauran antes de devolver.
    </Card>

    <Card title="isscriptable" href="./isscriptable">
      Comprueba el scriptable flag de una Roblox property en una Instance. La function devuelve primero un valor scriptable en cache cuando existe para el mismo instance reference y property name. Si no hay cache, el property name se resuelve mediante Roblox property metadata y el Instance class descriptor. Si no existe descriptor, o el field resuelto falta o no es un property entry, la function devuelve nil. Cuando se encuentra un property entry, lee scriptable state, guarda ese valor en scriptable override cache para la instance y la property, y devuelve el boolean. La function no cambia el scriptable flag.
    </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">
      Guarda un scriptable override para una Roblox property en scriptable override cache y devuelve el previous scriptable state. El primer argumento debe ser Instance object, el segundo argumento debe ser un string property name, y el tercer argumento debe ser boolean. Si ya existe un cache entry para el mismo instance reference y property name, se reemplaza el cached scriptable value y se devuelve el valor antiguo del cache. En un cache miss, el property name se resuelve mediante Roblox property metadata y el Instance class descriptor. Si no existe descriptor, o el field resuelto falta o no es un property entry, la function devuelve nil. Cuando se encuentra un property entry, la function lee scriptable state, guarda el boolean solicitado mas el property reference en scriptable override cache, y devuelve el previous scriptable state value. GameIndexHook y GameNewIndexHook usan despues este cache estableciendo temporalmente el property field scriptable flag para una unica lectura o escritura indexed, y luego restauran el previous field flag.
    </Card>
  </CardGroup>
</div>
