Hi!
Here is my Color Picker. It should pick a color, change it, and then turn CC off. It instead crashes.
4COLOR:
local blue = script.Parent.Blue
local red = script.Parent.Red
local green = script.Parent.Green
local yellow = script.Parent.Yellow
local chosen = 0
chosen = (math.random(1,4))
-------code
while wait() do
if chosen == 1 then
blue.Color = {115, 114, 116}
wait (0.5)
blue.CanCollide = false
wait (5)
blue.CanCollide = true
blue.Color = {13, 105, 172}
chosen = (math.random(1,4))
elseif chosen == 2 then
green.Color = {115, 114, 116}
wait (0.5)
green.CanCollide = false
wait (5)
green.CanCollide = true
green.Color = {0, 255, 0}
chosen = (math.random(1,4))
elseif chosen == 3 then
red.Color = {115, 114, 116}
red.CanCollide = false
wait (5)
red.CanCollide = true
red.Color = {196, 40, 28}
chosen = (math.random(1,4))
elseif chosen == 4 then
yellow.Color = {115, 114, 116}
yellow.CanCollide = false
wait (5)
yellow.CanCollide = true
yellow.Color = {255, 255, 0}
chosen = (math.random(1,4))
end
end
6COLOR: (BUG FIRST POPPED UP HERE)
local blue = script.Parent.Blue
local red = script.Parent.Red
local green = script.Parent.Green
local yellow = script.Parent.Yellow
local magenta = script.Parent.Magenta
local orange = script.Parent.Orange
local chosen = 0
chosen = (math.random(1,6))
-------code
while wait() do
if chosen == 1 then
blue.Color = {115, 114, 116}
wait (0.5)
blue.CanCollide = false
wait (5)
blue.CanCollide = true
blue.Color = {13, 105, 172}
chosen = (math.random(1,6))
elseif chosen == 2 then
green.Color = {115, 114, 116}
wait (0.5)
green.CanCollide = false
wait (5)
green.CanCollide = true
green.Color = {0, 255, 0}
chosen = (math.random(1,6))
elseif chosen == 3 then
red.Color = {115, 114, 116}
red.CanCollide = false
wait (5)
red.CanCollide = true
red.Color = {196, 40, 28}
chosen = (math.random(1,4))
elseif chosen == 4 then
yellow.Color = {115, 114, 116}
yellow.CanCollide = false
wait (5)
yellow.CanCollide = true
yellow.Color = {255, 255, 0}
chosen = (math.random(1,6))
elseif chosen == 5 then
orange.Color = {115, 114, 116}
orange.CanCollide = false
wait (5)
orange.CanCollide = true
orange.Color = {213, 115, 61}
chosen = (math.random(1,6))
elseif chosen == 6 then
magenta.Color = {115, 114, 116}
magenta.CanCollide = false
wait (5)
magenta.CanCollide = true
magenta.Color = {170, 0, 170}
chosen = (math.random(1,6))
end
end