Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my button not changing color when my mouse enters it?

Asked by 4 years ago

local script:

local button = script.Parent
local running = false
button.MouseEnter:Connect(function()
    print("runned")
    button.Image = Color3.new(200, 200, 191)
end)

0
What is local running = false do in this script? iuclds 720 — 4y

1 answer

Log in to vote
0
Answered by
OnaKat 444 Moderation Voter
4 years ago

use BackgroundColor3 and Color3.fromRGB

button.BackgroundColor3 = Color3.fromRGB(200,200,191)
0
Thanks for the help! Freddan2006YT 88 — 4y
0
If (for some reason) you wanted to continue using Color3.new() instead of Color3.fromRGB(), since Color3.new() requires r,g,b to be 0-1 you could do Color3.new(200/255, 200/255, 191/255) Protoduction 216 — 4y
Ad

Answer this question