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
just something wrong in or (i think)
function onTouched(part) if part.Name == "GrassPart" or part.Name =="Head" then --see this line script.Parent:remove() end end script.Parent.Touched:connect(onTouched)