Reflection APIs

Functions

setscriptable

bool setscriptable(instance: Instance, property_name: string, scriptable: bool)

Sets a property's scriptable flag. Non-scriptable properties cannot be accessed from Lua. Returns the flag's original state. NOTE: Take care using this function as changes done also affect game scripts, introducing the possibility of creating detection vectors or breaking existing code.

gethiddenproperty

any gethiddenproperty(instance: Instance, property_name: string)

Safely reads a non-scriptable property value, including those of type BinaryString and SharedString.

sethiddenproperty

void sethiddenproperty(instance: Instance, property_name: string, value: any)

Safely sets a non-scriptable property value.

getproperties

table getproperties(instance: Instance)

Returns a dictionary of all property values, including any non-scriptable, for instance.

gethiddenproperties

table gethiddenproperties(instance: Instance)

Returns a dictionary of all non-scriptable property values for instance.

getpcdprop

(string, string) getpcdprop(instance: TriangleMeshPart)

Returns a TriangleMeshPart's PhysicalConfigData property.

getcallbackmember

any getcallbackmember(instance: Instance, property: string, return_raw?: bool = False)

Returns the value of a callback property, such as RemoteFunction.OnClientInvoke. NOTE; Arbitrary values can be passed here. See the documentation for getconnectionfunction for more information about this and what return_raw does.

geteventmember

ScriptSignal geteventmember(instance: Instance, event_name: string)

Creates an unrestricted signal object for any event in instance. Useful for connecting to conventionally non-scriptable signals.

getrendersteppedlist

table getrendersteppedlist()

Returns all callbacks bound with RunService:BindToRenderStep.