Pretty much I am trying to make a block change from red to green and I want it to repeat but I also dont want this huge text script and I cant seem to make it repeat
while true do script.Parent.BrickColor = BrickColor.new ("Lime green") wait(4) script.Parent.BrickColor = BrickColor.new ("Really red") wait(4) end
This is my script, I even tryed replacing the end with repeat and that did not work along with adding repeat before the end and it wouldn't work.
BrickColor.new() is meant to have Color Values as it's parameters, not strings. Therefore, the color parameters in RGB values would look something like this:
while true do script.Parent.BrickColor = BrickColor.new(0,255,0) wait(4) script.Parent.BrickColor = BrickColor.new(255,0,0) wait(4) end
Feel free to try that out and accept if it works
local Part = script.Parent -- make sure your script is inside of the part you want to change colors while true do Part.BrickColor = BrickColor.new ("Lime green") wait(1) Part.BrickColor = BrickColor.new ("Really red") wait(1) end
this worked for me note: if you want to make it more then just 2 colors dont use Part.BrickColor = BrickColor.new ("Really red") with a whole bunch of wait() because that is really inefficient you can use a list and it will make your life a lot easier and if you use the list properly you wont even have to wait() multiple time
Keep scripting you'll get better :)