messing around with click detectors and i made a button. Im trying to make it turn green when you press it and stay green.
local cd = script.Parent local light = game.Workspace.WarningLight local Button = game.Workspace.Button.Buttn cd.MouseHoverEnter:Connect(function() Button.BrickColor = BrickColor.new ("Bright red") end) cd.MouseHoverLeave:Connect(function() Button.BrickColor = BrickColor.new ("Institutional white") end) cd.MouseClick:Connect(function() light.BrickColor = BrickColor.new ("Institutional white") game.Workspace.WarningLight:Destroy() Button.BrickColor = BrickColor.new ("Lime green") --turns it green until your cursor leaves the button end)
Trying to make it stay green
Do you want it to turn green when somebody clicks it? if so then it would be
local ClickDetector = script.Parent.ClickDetector ClickDetector.MouseClick:Connect(function() script.Parent.BrickColor = BrickColor.new("Lime Green") end)