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

> مساعدين الانعكاس للمثيلات والخصائص.

<div className="real-category-page">
  مساعدين الانعكاس للمثيلات والخصائص.

  ## الدوال المتاحة

  <CardGroup cols={2}>
    <Card title="gethiddenproperty" href="./gethiddenproperty">
      يقرأ Roblox property عبر reflection metadata، بما في ذلك non-scriptable properties. يجب أن يكون الوسيط الأول Instance object والثاني string property name. يجب أن يكون instance reference صالحا. إذا كان property descriptor مفقودا من Roblox property metadata، ترجع function nil فقط. إذا كان descriptor موجودا لكنه لا يتحول إلى property entry، تطلق "Not a property". لأنواع reflection Bool و Int و Float و Double و String و SystemAddress و SharedString و Vector3، تستدعي function getter وترجع value مع boolean يساوي !IsScriptable(). SystemAddress يرجع RemoteId.PeerId كـ integer. SharedString يرجع Content كـ string. Vector3 يقرأ من instance primitive Size offset ويطلق "can't get value" إذا كان touch data مفقودا. الأنواع الأخرى تقرأ عبر normal Lua field access بعد ضبط property scriptable flag مؤقتا إلى true؛ BinaryString يعامل مؤقتا كـ String لهذا القراءة. تتم استعادة original scriptable flag و BinaryString type قبل الرجوع.
    </Card>

    <Card title="isscriptable" href="./isscriptable">
      يتحقق من scriptable flag لخاصية Roblox property على Instance. ترجع function أولا قيمة scriptable مخزنة في cache عندما توجد لنفس instance reference و property name. عند عدم وجود cache، يتم حل property name عبر Roblox property metadata و Instance class descriptor. إذا لم يوجد descriptor، أو كان field المحلول مفقودا أو ليس property entry، ترجع function nil. عندما يتم العثور على property entry، تقرأ scriptable state، وتخزن هذه القيمة في scriptable override cache للـ instance والخاصية، ثم ترجع boolean. لا تغير function قيمة 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">
      تخزن scriptable override لخاصية Roblox property في scriptable override cache وترجع previous scriptable state. يجب أن يكون الوسيط الأول Instance object، والثاني string property name، والثالث boolean. إذا كان cache entry موجودا مسبقا لنفس instance reference و property name، يتم استبدال cached scriptable value وترجع function القيمة القديمة من cache. عند cache miss، يتم حل property name عبر Roblox property metadata و Instance class descriptor. إذا لم يوجد descriptor، أو كان field المحلول مفقودا أو ليس property entry، ترجع function nil. عندما يتم العثور على property entry، تقرأ function قيمة scriptable state، وتخزن boolean المطلوب مع property reference في scriptable override cache، ثم ترجع previous scriptable state value. يستخدم GameIndexHook و GameNewIndexHook هذا cache لاحقا عبر ضبط property field scriptable flag مؤقتا لقراءة أو كتابة indexed واحدة، ثم استعادة previous field flag.
    </Card>
  </CardGroup>
</div>
