gethiddenproperty

Gets the value of a hidden property.

Syntax

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

Parameters

ParameterTypeDescription
objectObjectThe object, including an Instance
propertystringThe hidden property name

Returns

TypeDescription
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, nil