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.

Syntax
Luau
gethiddenproperty(instance: Instance, property: string) -> (value: any, hidden: boolean)

Parameters

Function parameters
ParameterTypeDescription
instanceInstanceInstance that owns the property.
propertystringCase-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

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()
Kawaii documentation