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

Is there a way to execute a script for when a brick touches another brick?

Asked by 7 years ago

I know that there is a way to execute a script for when a player/Humanoid touches a brick, but is it possible to make a script execute a command for when a brick touches another brick?

Thanks!

1 answer

Log in to vote
0
Answered by 7 years ago

Touched functions do not specify for just players - they can work for a random part touching another part

script.Parent.Touched:connect(function(hit) -- You just need to define what "hit" the part
    if hit.Name == "RandomPart" then
        script.Parent.Transparency = 0.5
end)

This is just how I would suggest doing this.

0
Thank you sooo much! This was just the thing that I was looking for! :) Thanks again! :) spindelo 2 — 7y
Ad

Answer this question