I am trying to make a part change between 9 colors. I will post my script below, I still need to use them to make the brick randomize through the colors that I put. I put the start of my script, but I am a new scripter and am not sure how to randomize them. Could anyone help?
local color1 = BrickColor.new("Institutional white") local color2 = BrickColor.new("Pink") local color3 = BrickColor.new("Royal purple") local color4 = BrickColor.new("Really red") local color5 = BrickColor.new("Bright yellow") local color6 = BrickColor.new("Bright green") local color7 = BrickColor.new("Pink") local color8 = BrickColor.new("Neon orange") local color9 = BrickColor.new("Bright blue") local color9 = BrickColor.new("Black") while true do script.Parent.BrickColor = ?? wait(2.5) end
Thank you in advance! -HoneyBee
ez pz
local colors = { color1 = BrickColor.new("Institutional white"), color2 = BrickColor.new("Pink"), color3 = BrickColor.new("Royal purple"), color4 = BrickColor.new("Really red"), color5 = BrickColor.new("Bright yellow"), color6 = BrickColor.new("Bright green"), color7 = BrickColor.new("Pink"), color8 = BrickColor.new("Neon orange"), color9 = BrickColor.new("Bright blue"), color10 = BrickColor.new("Black") } while true do script.Parent.BrickColor = colors["color"..math.random(1, 10)] wait(2.5) end
u make it a table and then i get a random number between 1 - 10 and choose that