Hello, I've recently started learning how to use tables, and I am trying to practice with brick color change, but I don't know how to properly call the brick color command with a table.
This is the code, is it ok if I ask how to store the colors in a table, and call the table function with the BrickColor function?
local baseplate = game.Workspace.Baseplate while true do wait(0.5) local colors = math.random(1,5) if colors == 1 then baseplate.BrickColor = BrickColor.new("Really red") end
if colors == 2 then baseplate.BrickColor = BrickColor.new("Baby blue") end
if colors == 3 then baseplate.BrickColor = BrickColor.new("Sage green") end
if colors == 4 then baseplate.BrickColor = BrickColor.new("Bright yellow") end
if colors == 5 then baseplate.BrickColor = BrickColor.new("Neon orange") end
end

1 comment
yo sorry for the late reply, this is amazing dude! You actually gave me the code and explained how you did it. This is one of the best advices i've seen thanks!