Im making a button but I want the color to change from green to red on clicked :D Please Help.
script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.BrickColor = BrickColor.new("Really red")
end)
Im making a button but I want the color to change from green to red on clicked :D Please Help.
script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.BrickColor = BrickColor.new("Really red")
end)
Are you trying to make it alternate? If so, you need a debounce.
green = true
script.Parent.ClickDetector.MouseClick:connect(function()
if green == true then
green = false
script.Parent.BrickColor = BrickColor.new("Really red")
else
green = true
script.Parent.BrickColor = BrickColor.new("Bright green")
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.