sethiddenproperty
Writes supported properties, including supported hidden properties.
Syntax
sethiddenproperty(object: Instance, property: string, value: any) -> boolean
Also available as
set_hidden_property
Parameters
| Parameter | Type | Description |
|---|---|---|
object | Instance | The Instance to change. |
property | string | The property name, scriptable or not. |
value | any | The new value, of the property's type. |
Returns
| Type | Description |
|---|---|
boolean | true 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
- A value of the wrong type raises an error naming the expected type.
These are Game executor contracts. Check build requirements and session lifetimes before using them.
