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

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)

while true do
    script.Parent.BrickColor = BrickColor.new(Color3.new(255, 1, 1))
    wait(1.5)
    script.Parent.BrickColor = BrickColor.new(Color3.new(33, 84, 185))
end

RedtoBlue Enable

local function onMouseClick(player)
    script.Parent.RedtoBlue.Disabled=false

end
script.Parent.ClickDetector.MouseClick:connect(onMouseClick)

RedtoBlue Disable

local function onMouseClick(player)
    script.Parent.RedtoBlue.Disable=true
        script.Parent.BrickColor = BrickColor.new(Color3.new(255, 255, 255))

end
script.Parent.ClickDetector.MouseClickRight:connect(onMouseClick)

Please help, not working.

0
So what is the problem? LightPolaris 2 — 7y
0
Not sure, colors not changing, MouseClickRight isn't a real function, and I'm sure theres more wrong. barrettr500 53 — 7y

Answer this question