sethiddenproperty

Sets the value of a hidden property.

Syntax

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

Parameters

ParameterTypeDescription
objectObjectThe object, including an Instance
propertystringThe hidden property name
valueanyThe value to set

Returns

TypeDescription
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 scriptable

Caution

Modifying hidden properties can cause unexpected behavior or break instances. Only modify properties you understand.