This works...
function onTouched(part)
if part.Name == "GrassPart" then
script.Parent:remove()
end
end
script.Parent.Touched:connect(onTouched)
However, I wanted to add more parts, but it doesn't work. I tried this...
function onTouched(part)
if part.Name == "GrassPart" or "Head" then
script.Parent:remove()
end
end
script.Parent.Touched:connect(onTouched)
How do I make it work with more parts? I know I could just do this, but is there a shortcut?
function onTouched(part)
if part.Name == "GrassPart" then
script.Parent:remove()
end
end
function onTouched(part)
if part.Name == "Head" then
script.Parent:remove()
end
end
script.Parent.Touched:connect(onTouched)
Thanks! I repay you with with my own joke "What job does a plum do? Plumbing." Ha... Ha... Ha... Cough Cough

1 comment
Use :Destroy() NOT remove!!! (==""Head") is wrong (part.Name =="Head") needs to be there.