function onTouched(hit)
hit:Destroy()
end
connection = script.Parent.Touched:connect(onTouched)
COMMUNITY QUESTION
How do I make this script only destroy parts if it has one of multiple names?
1 answer
You need to use the if command
function onTouched(hit) 02 if hit.name == "Custom name here" or hit.name == "Custom name here" then 03 04 05 hit:Destroy() 06 07 08 end 09 end
This discussion is preserved as it was. New answers, comments, and votes are closed.
