here is my script
local button = script.Parent
local color = button.BackgroundColor3
color = Color3.new(255,0,0)
script.Parent.MouseButton1Click:Connect(function ()
if color == Color3.new(255,0,0) then
color = Color3.new(4,255,0)
end
if color == Color3.new(4,255,0) then
color = Color3.new(255,0,0)
end
end)

2 comments
Change each Color3.new to Color3.fromRGB
it didnt work