[8] Intro to GUIs - Roblox Scripting Tutorials

Опубликовано: 13 Август 2026
на канале: MangoMiner
13,770
82

This is the script used in this video to change the button's color:

button = script.Parent
blue = button.BackgroundColor3
red = Color3.new(1,0,0)
green = Color3.new(0,1,0)

function changeColor()
if button.BackgroundColor3 == blue then
button.BackgroundColor3 = red
elseif button.BackgroundColor3 == red then
button.BackgroundColor3 = green
else
button.BackgroundColor3 = blue
end
end

button.MouseButton1Click:connect(changeColor)