Skip to main content

Buttons

Buttons are parts that toggle a set of parts between a Pressed and Unpressed state. They are linked to their corresponding button activated objects by their Color property.

Use Cases

Buttons may be used to create toggleable parts and objects. This can be used for progression, timed sections, or to activate platforms that make recovery faster.

Configuration

NameDefault ValueDescription
HideGUIfalseWhen true, the timer label displayed on the button and the game's UI will not be shown.
PadDistance10When PadMode is true, the maximum distance above the button the object that activated the button can be before it deactivates.
PadModefalseWhen true, the button will only be activated while an object is actively touching the ButtonPart. If not touching, it will automatically deactivate.
PressedMaterialNeonThe material of the Button when pressed.
PressOffsetCFrame.new(0, -0.75, 0)The offset of the ButtonPart when pressed. Uses the provided TweenConfiguration.
Timer0The time the button will be activated for before automatically deactivating. If set to 0, the button will not have a timer.
TimerDecimalPlaces0The number of decimal places displayed on the timer label.
TimerText{T}The text that appears on the timer display. See this page for more info.

The TimerLabel is found inside the ButtonConfiguration and can be configured seperately. The UseSpecialColor tag can be used on the TimerLabel to disable its automatic coloring.

Button Activated Objects

Any Part with the ButtonActivated tag will be considered a button activated object. By default, button activated objects behave as follows:

Button StateCanCollideTransparencyClient Object State
Unpressedfalse0.6Disabled
Pressedtrue0Enabled

These will be inverted if the object has the Invert tag.

Please note that if 64 or more parts are toggled at once, there will be a 1 frame delay every 64 parts to improve performance.

Supported Visual Instances

If the following objects are found inside of a button activated object, they will match the object's transparency when toggled:

ObjectProperty Affected
DecalTransparency
TextureTransparency
SelectionBoxTransparency
SelectionSphereTransparency
FrameBackgroundTransparency
CanvasGroupGroupTransparency
TextLabelTextTransparency
ImageLabelImageTransparency

If the following objects are found inside of a button activated object, they will have their Enabled property toggled to match the button's state:

Object
Beam
ParticleEmitter
Fire
Sparkles
Smoke
Trail
UIStroke
UIGradient

Button Activated Object Configurations

Button activated objects have special configurations that can be modified using Attributes and Tags:

NameTypeDescription
ColorOverrideColor3 AttributeThe object will behave as if it is linked to that Color rather than the object's actual color. If a ButtonPart has this attribute, its functionality may be toggled by other Buttons.
FullHideTagSets the Unpressed Transparency to 1.
SetTransparencynumber AttributeChanges the Transparency of the object in the Unpressed state.
IgnoreTransparencyTagThe Transparency of the object will not be changed and remains in its default state from Studio.
IgnoreCanCollideTagThe CanCollide of the object will not be changed and remains in its default state from Studio.
IgnoreEnabledTagThe Enabled property of the object will not be changed and remains in its default state from Studio.
InvisibleTagThe Transparency of the object will always be 1 no matter the button state.
InvertTagSwaps the properties of the Pressed and Unpressed states.
IgnoreInitialActivateTagThe object will not be affected by the first update that happens when the Button initially loads. It will still be affected by further updates.
IgnoreAllTagThe object will act as if the IgnoreTransparency, IgnoreCanCollide and IgnoreEnabled tags are all present.

Unsupported Client Objects

Below is a list of all the client objects that either cannot currently be toggled by a Button, or have known issues regarding them when button activated.

Unsupported Client ObjectNotes
VanishersInconsistent behaviour when toggled while vanishing