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

How do I make a script changes the colour of a brick to whatever it touches?

Asked by 10 years ago

I want a script so say BlockA is Green and BlockB is Blue, BlockB then touches BlockA, BlockA turns blue.

1 answer

Log in to vote
0
Answered by 10 years ago
function onTouched(hit)
    if hit.Name == "BlockB" then
script.Parent.BrickColor = BrickColor.Blue()
end
end
script.Parent.Touched:connect(onTouched)
0
IS there a way so that if BlockA was then to change colour, BlockB would be the same? Michael007800 144 — 10y
Ad

Answer this question