gethiddenproperty
Gets the value of a hidden property.
Syntax
gethiddenproperty(object: Object, property: string) -> any?, boolean?Parameters
| Parameter | Type | Description |
|---|---|---|
object | Object | The object, including an Instance |
property | string | The hidden property name |
Returns
| Type | Description |
|---|---|
any? | The property value, or nil when the property is missing, write-only, or cannot be read |
boolean? | Whether the property is hidden from scripts; omitted for a missing property |
Description
gethiddenproperty reads a property and reports whether it is normally hidden from scripts. Ordinary properties return false as the second value.
Example
local part = Instance.new("Part")
local value, wasHidden = gethiddenproperty(part, "Transparency")
print("Value:", value)
print("Was hidden:", wasHidden) -- false
local missingValue, missingHidden = gethiddenproperty(part, "NotAProperty")
print(missingValue, missingHidden) -- nil, nilRelated Functions
sethiddenproperty- Set a hidden propertyisscriptable- Check if property is scriptable