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

How would i make a brick have a random material?

Asked by 9 years ago

What I mean is there something like BrickColor.Random() for Material?

2 answers

Log in to vote
0
Answered by
Validark 1580 Snack Break Moderation Voter
9 years ago

No, because Material values are Enums, and don't have functions that can be applied to them. On the other hand, BrickColor is a userdata value and has specific functions and properties.

Ad
Log in to vote
1
Answered by 9 years ago

Yes, there is a way, and here It is:

local Materials = {"DiamondPlate","Concrete","Brick"}--put all of the selections here
game.Workspace.Part.Matieral = Materials[math.random(#Materials)]

Answer this question