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

Color changing conveyor belt?

Asked by 9 years ago

how do i change the color of an object when it touches a specific object?

1 answer

Log in to vote
0
Answered by 9 years ago

We can't make scripts for you but we can help you start one! Here is basically how to do it: 1. Touched event 2. BrickColor.Random()


Touched

Touched runs when someone touches the part:

script.Parent.Touched:connect(function(p)
    print(p.Name.." touched this part.")
end)

BrickColor.Random()

This chooses a random color out of the 64 different brickcolors there are on roblox(There are actually 100+ brick colors but some colors do not show up.)

workspace.Part.BrickColor = BrickColor.Random()


Find a way to mix these together and you've got your script! Hope it helps!

Ad

Answer this question