Skip to content

gethiddenproperty

Avoid relying on setscriptable to implement this function!

Some executors implement this function using setscriptable, which is limited and/or detectable.

gethiddenproperty retrieves the value of a hidden or non-scriptable property (e.g. BinaryString, SharedString, SystemAddress) from a given Instance, even if it would normally throw an error when accessed directly.

This function also returns whether the accessed property was hidden.

function gethiddenproperty(instance: Instance, property_name: string): (any, boolean)

Parameters

Parameter Description
instance The instance containing the hidden property.
property_name The name of the property to access.

Example

Reading a hidden property
1
2
3
4
local part = Instance.new("Part")

print(gethiddenproperty(part, "Name"))       -- Output: Part, false
print(gethiddenproperty(part, "DataCost"))   -- Output: 20, true