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

How do I make it so that this color is random?

Asked by 10 years ago
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
part = game.Workspace["Change1"]
part.BrickColor = BrickColor.new("Navy Blue")
end
end)

3 answers

Log in to vote
0
Answered by 10 years ago
script.Parent.Touched:connect(function(hit)
2
if hit.Parent:findFirstChild("Humanoid") then
3
part = game.Workspace["Change1"]
4
part.BrickColor = BrickColor.Random()
5
end
6
end)

Ad
Log in to vote
0
Answered by
Nickoakz 231 Moderation Voter
10 years ago

^Tip for above, If you hover over the code, two icons appear. One of them is to copy. That might help you so you dont have 2 or 3 or 4, 5, 6..

Log in to vote
0
Answered by 10 years ago

game.Workspace.Part.BrickColor = BrickColor.Random()

Answer this question