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

How do I create a brick that turns to a random colour then stops?

Asked by 9 years ago

I'm pretty new to scripting and I need a little bit of help. How can I create a brick that when you touch it, it turns to a random colour then stops?

Thanks!

Curly.

1
What do you mean by, 'then stops'? DigitalVeer 1473 — 9y
0
It turns to a random colour then stays at that random colour until touched again. curlyrew400 0 — 9y

1 answer

Log in to vote
2
Answered by 9 years ago

Something like this:

script.Parent.Touched:connect(function()
    script.Parent.BrickColor = BrickColor.Random()
end)

Please upvote and accept answer if it works!

Ad

Answer this question