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

> Trình trợ giúp phản ánh cho các phiên bản và thuộc tính.

<div className="real-category-page">
  Trình trợ giúp phản ánh cho các phiên bản và thuộc tính.

  ## Hàm có sẵn

  <CardGroup cols={2}>
    <Card title="gethiddenproperty" href="./gethiddenproperty">
      Doc Roblox property qua reflection metadata, bao gom non-scriptable properties. Doi so dau tien phai la Instance object va doi so thu hai phai la string property name. instance reference phai hop le. Neu property descriptor bi thieu trong Roblox property metadata, function chi tra ve nil. Neu descriptor ton tai nhung khong resolve thanh property entry, no tao "Not a property". Voi reflection types Bool, Int, Float, Double, String, SystemAddress, SharedString va Vector3, function goi getter va tra ve value cong voi boolean bang !IsScriptable(). SystemAddress tra ve RemoteId.PeerId duoi dang integer. SharedString tra ve Content duoi dang string. Vector3 doc tu instance primitive Size offset va tao "can't get value" neu thieu touch data. Cac property types khac duoc doc qua normal Lua field access sau khi tam thoi dat property scriptable flag thanh true; BinaryString tam thoi duoc xu ly nhu String cho lan doc do. original scriptable flag va BinaryString type duoc khoi phuc truoc khi return.
    </Card>

    <Card title="isscriptable" href="./isscriptable">
      Kiem tra scriptable flag cua Roblox property tren Instance. Function truoc tien tra ve gia tri scriptable trong cache neu co cho cung instance reference va property name. Khi cache miss, property name duoc resolve qua Roblox property metadata va Instance class descriptor. Neu khong co descriptor, hoac field duoc resolve bi thieu hoac khong phai property entry, function tra ve nil. Khi tim thay property entry, function doc scriptable state, luu gia tri do vao scriptable override cache cho instance va property, roi tra ve boolean. Function khong thay doi 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">
      Luu scriptable override cho Roblox property trong scriptable override cache va tra ve previous scriptable state. Doi so dau tien phai la Instance object, doi so thu hai phai la string property name, va doi so thu ba phai la boolean. Neu da co cache entry cho cung instance reference va property name, cached scriptable value duoc thay the va cached value cu duoc tra ve. Khi cache miss, property name duoc resolve qua Roblox property metadata va Instance class descriptor. Neu khong co descriptor, hoac field duoc resolve bi thieu hoac khong phai property entry, function tra ve nil. Khi tim thay property entry, function doc scriptable state, luu boolean duoc yeu cau cung property reference vao scriptable override cache, roi tra ve previous scriptable state value. GameIndexHook va GameNewIndexHook sau do dung cache nay bang cach tam thoi dat property field scriptable flag cho mot indexed read hoac write duy nhat, roi khoi phuc previous field flag.
    </Card>
  </CardGroup>
</div>
