I Wanna make A Baseplate that turns A Random Color so I Did this
B = math.random(1,2) if B == 2 then local b = Script.Parent b.BrickColor = BrickColor.new("Pastel Blue") else do local b = Script.Parent b.BrickColor = BrickColor.new("Bright Green") end end
Its not Working Please Help
You could do BrickColor.Random()
It gives the brick a random BrickColor Black, Red, Blue, anything that you can normally get it will give you a random brickcolor.
But with your script if you just want the two brickcolors;
C = math.random(1,2) --Don't want similar tags, it matched too closely with the brick tags. if C == 2 then local b = script.Parent --Lua is case sensitive, it's script, not Script. b.BrickColor = BrickColor.new("Pastel blue") --BrickColors are Case Sensitive as well. else --You only need do's in loops, not in if then statements. local b = script.Parent --Lua is case sensitive. b.BrickColor = BrickColor.new("Bright green") --Same here. end end
The "b" on the first 2 lines needs to NOT be a capital. Lowercase. If that dosent work then contact me and I'll try creating a script for it
This is all you need:
script.Parent.BrickColor = BrickColor.random()