| Navigasi fungsi | Deskripsi |
|---|---|
gethiddenproperty | Membaca Roblox property melalui reflection metadata, termasuk non-scriptable properties. Argumen pertama harus Instance object dan argumen kedua harus string property name. instance reference harus valid. Jika property descriptor tidak ada di Roblox property metadata, function hanya mengembalikan nil. Jika descriptor ada tetapi tidak resolve menjadi property entry, function menghasilkan “Not a property”. Untuk reflection types Bool, Int, Float, Double, String, SystemAddress, SharedString, dan Vector3, function memanggil getter dan mengembalikan value plus boolean yang sama dengan !IsScriptable(). SystemAddress mengembalikan RemoteId.PeerId sebagai integer. SharedString mengembalikan Content sebagai string. Vector3 membaca dari instance primitive Size offset dan menghasilkan “can’t get value” jika touch data tidak ada. property types lain dibaca melalui normal Lua field access setelah property scriptable flag sementara disetel ke true; BinaryString sementara diperlakukan sebagai String untuk pembacaan itu. original scriptable flag dan BinaryString type dipulihkan sebelum return. |
isscriptable | Memeriksa scriptable flag untuk Roblox property pada Instance. Function ini lebih dulu mengembalikan nilai scriptable dari cache jika ada untuk instance reference dan property name yang sama. Saat cache miss, property name diselesaikan melalui Roblox property metadata dan Instance class descriptor. Jika descriptor tidak ada, atau field yang ditemukan hilang atau bukan property entry, function mengembalikan nil. Saat property entry ditemukan, function membaca scriptable state, menyimpan nilai itu di scriptable override cache untuk instance dan property, lalu mengembalikan boolean. Function ini tidak mengubah scriptable flag. |
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. |
setscriptable | Menyimpan scriptable override untuk Roblox property di scriptable override cache dan mengembalikan previous scriptable state. Argumen pertama harus Instance object, argumen kedua harus string property name, dan argumen ketiga harus boolean. Jika cache entry sudah ada untuk instance reference dan property name yang sama, cached scriptable value diganti dan nilai cache lama dikembalikan. Saat cache miss, property name diselesaikan melalui Roblox property metadata dan Instance class descriptor. Jika descriptor tidak ada, atau field yang ditemukan hilang atau bukan property entry, function mengembalikan nil. Saat property entry ditemukan, function membaca scriptable state, menyimpan boolean yang diminta plus property reference di scriptable override cache, lalu mengembalikan previous scriptable state value. GameIndexHook dan GameNewIndexHook kemudian memakai cache ini dengan sementara mengatur property field scriptable flag untuk satu indexed read atau write, lalu memulihkan previous field flag. |
Reflection
Reflection
Pembantu refleksi untuk instance dan properti.
Pembantu refleksi untuk instance dan properti.