GuiButton
GuiButton : GuiObject
Overview
GuiButton is an abstract class that inherits from GuiObject, defining shared functionality for clickable UI elements like TextButton and ImageButton.
Properties
Methods
Events
Activated
The event triggers when the button is pressed.
It fires when a button is clicked or touched and released over the UI element, executing at the input’s release (Up) rather than its start.
For this event to fire correctly, the button’s Active property must be set to true.
Parameters
Code Samples
local ScreenGui = script.Parent
local ImageButton = ScreenGui.ImageButton
local function OnActivated()
print("Activated!")
end
ImageButton.Activated:Connect(OnActivated)
Last updated