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

Random Color and shape?

Asked by 9 years ago

I want to make a random shaped part and a random colored part via script.

x = Instance.new("Part")
x.Shape = -- random shape
x.BrickColor = -- random color

1 answer

Log in to vote
0
Answered by
iFlusters 355 Moderation Voter
9 years ago

To choose a random brick colour, there is a built in function to do this:

x.BrickColor = x.BrickColor.Random()

OR

local color = Color3.new(math.random(), math.random(), math.random())
x.BrickColor = color
Ad

Answer this question