sethiddenproperty
Sets the value of a hidden property.
Syntax
sethiddenproperty(object: Object, property: string, value: any) -> boolean?Parameters
| Parameter | Type | Description |
|---|---|---|
object | Object | The object, including an Instance |
property | string | The hidden property name |
value | any | The value to set |
Returns
| Type | Description |
|---|---|
boolean? | Whether the property was non-scriptable, or no value when the property is missing |
Description
sethiddenproperty changes the selected property and returns whether it is normally hidden from scripts.
Example
local part = Instance.new("Part")
local wasHidden = sethiddenproperty(part, "Transparency", 0.5)
print(part.Transparency) -- 0.5
print(wasHidden) -- false, because Transparency is normally scriptableCaution
Modifying hidden properties can cause unexpected behavior or break instances. Only modify properties you understand.
Related Functions
gethiddenproperty- Get a hidden propertysetscriptable- Make properties scriptable