The = is underlines red
while true do
script.Parent.BrickColor = BrickColor.Random()
wait(0.5)
script.Parent.BrickColor = BrickColor.Random()
repeat
until
script.Parent.BrickColor = BrickColor.new("Black")
end
The = is underlines red
while true do
script.Parent.BrickColor = BrickColor.Random()
wait(0.5)
script.Parent.BrickColor = BrickColor.Random()
repeat
until
script.Parent.BrickColor = BrickColor.new("Black")
end
Hey Snipper!
I've made a fix to your bit of code by removing the repeat until. Also, an reason that the '=' is underlined red is because the code expects the boolean operator "==".
while true do
script.Parent.BrickColor = BrickColor.Random()
wait(0.5)
if script.Parent.BrickColor == BrickColor.Black() then
break
end
end
So that break command after the "if then" statement forces the loop to end there.
Hope this helps.
This discussion is preserved as it was. New answers, comments, and votes are closed.