gethiddenproperty Synchronous
gethiddenprop
Read a reflected property and learn whether Roblox normally marks it as hidden from scripts. Keep both return values: the property value alone does not tell you whether the member is hidden.
Luau
gethiddenproperty(instance: Instance, property: string) -> (value: any, hidden: boolean)Parameters
| Parameter | Type | Description |
|---|---|---|
instance | Instance | Instance that owns the property. |
property | string | Case-sensitive reflected property name. |
Returns
(value: any, hidden: boolean)Two values: the property value and a boolean that is true when the native descriptor is not scriptable.
Usage notes
Unknown properties and unreadable values raise an error. The legacy BasePart alias siz reads Size and reports hidden.
Example
Luau
local part = Instance.new("Part")
local ok, value, hidden = pcall(gethiddenproperty, part, "CanCollide")
if ok then
print("Value:", value, "Hidden:", hidden)
else
warn("Could not read property:", value)
end
part:Destroy()