New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Still have questions? Join our Discord server and get real time help.
1

# How do you do a 'Part-touch-Part' effect?

Asked by 6 years ago

Hey guys. I just have one simple question: How would you make a Part do an action when touched by another Part?

For example, let's just say that I have a part named GRASS and another part named MOWER. Whenever the player pushes the part named MOWER and it touches the other part named GRASS, GRASS becomes a different size. In this case, GRASS becomes smaller.

Would the general concept of it go something like this? :

function touch(hit)
if hit.Name == "MOWER" then
script.Parent.Size = Vector3.new(1,2,1)
end
end
script.Parent.Touched:connect(touch)


If anyone could teach me, it would be very, very helpful!