Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a red yellow green color randomizer?

Asked by
eetan1 0
10 years ago

I have been using the BrickColor.Random() command but what can go inside of the brackets? I tried putting BrickColor.Random("Red", "Blue", "Green") but it didn't work

1 answer

Log in to vote
1
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

I'm pretty sure nothing goes inside the parentheses. If you want to pick a random color between red, blue, and green, I would recommend a table.

local Colors = {"Bright red","Bright blue","Dark green"} --Make sure it's a real brick color!
local randomColor = Colors[math.random(1,#Colors)]
workspace.Part.BrickColor = BrickColor.new(randomColor)
0
the randomcolor variable would only be a number, it should be Colors[math.random(1,#Colors)], instead of math.random(1,#Colors) TurboFusion 1821 — 10y
0
That's correct, my mistake. Perci1 4988 — 10y
0
Thanks :D eetan1 0 — 10y
Ad

Answer this question