ReferenceReflection

sethiddenproperty

Writes supported properties, including supported hidden properties.

Syntax

sethiddenproperty(object: Instance, property: string, value: any) -> boolean

Also available as

set_hidden_property

Parameters

ParameterTypeDescription
objectInstanceThe Instance to change.
propertystringThe property name, scriptable or not.
valueanyThe new value, of the property's type.

Returns

TypeDescription
booleantrue when the property is hidden from scripts, false when it is ordinary.

Description

The value goes through the class's own setter, so the engine runs the same change handling it would for an ordinary assignment.

Example

local part = Instance.new("Part")
sethiddenproperty(part, "Locked", true)
print(part.Locked)

Notes

These are Game executor contracts. Check build requirements and session lifetimes before using them.