Reflection

sethiddenproperty

Sets a hidden property and reports whether the property was hidden.

Syntax

sethiddenproperty(instance: userdata, property: string, value: any): boolean | nil

Arguments

NameTypeDescription
instanceuserdataRoblox instance to inspect or update.
propertystringProperty name to read or change.
valueanyNew value to write.

Returns

NameTypeDescription
wasHiddenboolean | nilPrevious or detected hidden-property state.

Description

Sets a hidden property and reports whether the property was hidden.

Call it with 3 parameter(s): instance, property, value. The argument table explains which values are required and which ones only refine the behavior.

It returns wasHidden (boolean | nil). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Example call with placeholder values.

local result = sethiddenproperty(game, "example", nil)
print(result)