On first click flicker between two certain colors, on second click disable and turn white?
Asked by
7 years ago Edited 7 years ago
I'm trying to make the cop light on top of a cop car and I want it so if you click on the light it flickers between Really Read and Deep Blue with 1.5 waits between and it continues untill clicked for the second time and it turns white and becomes disabled. If not possible the way I want it then whatever is closest. I have a part with a ClickDetector and these scripts
RedtoBlue (Disabled Script)
2 | script.Parent.BrickColor = BrickColor.new(Color 3. new( 255 , 1 , 1 )) |
4 | script.Parent.BrickColor = BrickColor.new(Color 3. new( 33 , 84 , 185 )) |
RedtoBlue Enable
1 | local function onMouseClick(player) |
2 | script.Parent.RedtoBlue.Disabled = false |
5 | script.Parent.ClickDetector.MouseClick:connect(onMouseClick) |
RedtoBlue Disable
1 | local function onMouseClick(player) |
2 | script.Parent.RedtoBlue.Disable = true |
3 | script.Parent.BrickColor = BrickColor.new(Color 3. new( 255 , 255 , 255 )) |
6 | script.Parent.ClickDetector.MouseClickRight:connect(onMouseClick) |
Please help, not working.