im trying to change the part color everytime you click it. it goes in order of pink, blue, red, green, and then back to pink. i dont know why this wont work? Nothing is in the output.
local click = script.Parent.ClickDetector
partcolor = script.Parent.BrickColor
local sound = script.Parent.Beep
click.MouseClick:connect(function()
if partcolor == "255, 0, 191" then
sound:Play()
partcolor = "0, 0, 255"
end
if partcolor == "0, 0, 255" then
sound:Play()
partcolor = "255, 0, 0"
end
if partcolor == "255, 0, 0" then
sound:Play()
partcolor = "0, 255, 0"
end
if partcolor == "0, 255, 0" then
sound:Play()
partcolor = "255, 0, 191"
end
end)
please help, thank you
