I have this script to remove parts:
script.Parent.Touched:connect(function(hit) hit:Remove() end)
This does what it needs to because It deletes the parts it touches but I am making a tycoon. I am trying to make it to where it removes the part depending on its name like If the parts name is Part22 then it will remove Part22 not Part. This is so that I can make it to where when the parts fly out of the tycoon they dont sit around and lag. Please help, I have not been able to find away to do this!
By, TixyScripter
script.Parent.Touched:connect(function(hit) if hit.name == "Part22" then --Or whatever... hit:remove() end end)
Here you go.
The below script if for removing multiple parts so you don't need 30 scripts in one part.
script.Parent.Touched:connect(function(hit) if hit.name == "Part22" or "INSERT PART NAME HERE" then hit:remove() end end)