GUI = Graphical User Interface
It’s stuff like buttons, text, health bars, and menus that show on the player’s screen.
| Item | ✅ Used For | Where to put it |
|---|---|---|
ScreenGui |
The main GUI container | Put inside StarterGui |
TextLabel |
Shows text (not clickable) | Inside a ScreenGui |
TextButton |
Clickable text button | Inside a ScreenGui |
ImageLabel |
Shows an image (not clickable) | Inside a ScreenGui |
ImageButton |
Clickable image button | Inside a ScreenGui |
Frame |
A panel/container | Inside a ScreenGui or other UI elements |
Put this inside StarterGui in Explorer:
StarterGui
└── ScreenGui
├── TextLabel
└── TextButton
The GUI will automatically show up for each player.
lua
CopyEdit
local button = script.Parent
button.MouseButton1Click:Connect(function()
button.Text = "Clicked!"
end)
✅ This changes the button’s text when it’s clicked.
| UI Element | Property | What it Does |
|---|---|---|
| Any GUI item | Visible |
Show/hide the element |
TextLabel / TextButton |
Text |
The displayed text |
TextButton |
MouseButton1Click |
Runs code when clicked |
Frame |
BackgroundColor3 |
Changes background color |
| All UI | Position / Size |
Controls where it is on screen |