Reflection

Object properties, callbacks, events and native reflection metadata.

12 functionssUNC 100%Lynx 0.0.0

Property, callback and event accessors take an Object; an Instance is also an Object. Physics and render-list helpers retain their class-specific arguments. Property dictionaries contain values, not descriptor addresses or a list of names.

Property values and scriptability

getproperties

getproperties(object: Object): {[string]: any}

Reads property descriptors for the object and returns a name-to-value dictionary. Nil-valued properties and getters that raise an error are skipped; write-only properties use an available readable alias or are skipped.

Also available as get_properties.

gethiddenproperties

gethiddenproperties(object: Object): {[string]: any}

Like getproperties, restricted to properties not currently scriptable for the object. Nil or failing reads are omitted.

Also available as get_hidden_properties and gethiddenprops.

gethiddenproperty

gethiddenproperty(object: Object, property: string): (any, boolean)

Reads a property through the descriptor reader. The second result is true if the property was not scriptable before the read. A write-only property returns its readable alias when one exists, otherwise nil. An unknown property raises an error.

Also available as get_hidden_property and get_hiddenproperty.

sethiddenproperty

sethiddenproperty(object: Object, property: string, value: any): boolean

Writes the named property and returns whether it was not scriptable before the write. Unknown names and read-only properties raise an error; values must convert to the property type.

Also available as set_hidden_property and set_hiddenproperty.

isscriptable

isscriptable(object: Object, property: string): boolean?

Returns effective scriptability, including the per-object override. Returns nil for a missing property or an unavailable scriptability result.

Also available as is_scriptable and is_script_able.

setscriptable

setscriptable(object: Object, property: string, enabled: boolean): boolean

Stores a per-object scriptability override and returns the previous effective value. The property must exist.

Also available as set_script_able and set_scriptable.

getpcdprop

getpcdprop(part: TriangleMeshPart): (string, string)

Reads PhysicalConfigData and returns its 32-character lowercase shared-string hash and raw binary data. An empty shared string yields two empty strings. Requires a TriangleMeshPart with that property.

Also available as getpcd.

getcallbackmember

getcallbackmember(object: Object, property: string, raw: boolean?): any?

Reads the same validated callback/thread reference as getcallbackvalue. raw defaults to false: a function is returned directly; for a callable table, its __call function is returned; other values become nil. With raw=true, returns the assigned value unchanged. All modes return nil for unavailable, replaced, wrong-VM or collected owner threads.

Also available as get_callback_member.

geteventmember

geteventmember(object: Object, event: string): RBXScriptSignal

Constructs a signal for an existing event descriptor and marks it scriptable. Invalid objects/events or failed signal construction raise an error.

Also available as get_event_member.

getrendersteppedlist

getrendersteppedlist(): {{Function: function?, Thread: thread?, Name: string, Priority: number}}

Returns current same-VM BindToRenderStep entries in native priority order. Missing registry function/thread entries are nil. Entries whose weak callback reference is unavailable are skipped.

Also available as get_renderstepped_list and get_render_stepped_list.

isnetworkowner

isnetworkowner(part: BasePart): boolean

Reads NetworkOwnerV3 and returns whether its native peer identifier is at least 4. Requires a BasePart. This is the implemented peer test, not a comparison with a Player object.

Also available as is_network_owner.

setsimulationradius

setsimulationradius(radius: number, setMaximum: number?): ()

Sets LocalPlayer.SimulationRadius. If argument 2 is numeric, it also sets MaxSimulationRadius to radius. The current implementation uses argument 2 only as a numeric presence check; it does not use its numeric value.

Also available as set_simulation_radius.

local object = Instance.new("BindableFunction")
object.OnInvoke = function(value) return value * 2 end
local callable = getcallbackmember(object, "OnInvoke")
local rawValue = getcallbackmember(object, "OnInvoke", true)
print(callable == rawValue)
object:Destroy()