gethiddenproperty Synchronous
gethiddenprop
Read a reflected property from an Instance or Roblox Object and learn whether it is normally hidden from scripts. Keep both return values: the value alone does not tell you whether the member is hidden.
Luau
gethiddenproperty(
instance: Instance | Object,
property: string
) -> (value: any, hidden: boolean)Parameters
| Parameter | Type | Description |
|---|---|---|
instance | Instance | Object | Instance or Roblox Object, such as an EditableImage, 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.
A NetAssetRef property returns serialized binary data with type and version bytes at the front, followed by the complete asset stream. It is not just raw mesh content and can contain NUL bytes.
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()