local part = script.parent.parent.GroupOfRopes
function onTouched(part)
script.Parent:Destroy()
end
COMMUNITY QUESTION
How do I make a part get destroyed when it touches another part?
2 answers
You didnt connect ontouched to part.Touched.
local part = script.parent.parent.GroupOfRopes
function onTouched(part)
script.Parent:Destroy()
end
script.Parent.Touched:Connect(onTouched)
Okay. So I think this will work:
local part = script.parent.parent.GroupOfRopes
function onTouched(hit)
if hit.Parent.Name == "GroupOfRopes" then
script.Parent:remove()
end
script.Parent.Touched:Connect(onTouched)
3 comments
0
Man, someone beat me to it. If only I typed faster...
0
You're wrong. If the part touches a model called "GroupOfNets", it gets destroyed.
0
Ok
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Hmm so when you touch the GroupOfRopes it destroy the parent? or when you touch the Parent it destroy the group of ropes?