Hello, so i have a script where when a tool is touched with a part that the part will be destroyed, but I also want the tool that touches to be destroyed as well. If someone could help that would be greatly appreciated! Script:
script.Parent.Touched:Connect(function(p) if p.Parent.Name == "Sandbag" then script.Parent:Destroy() end end)
Basically I just want to add onto that script
script.Parent.Touched:Connect(function(p) if p.Parent.Name == "Sandbag" then -- Checks if the part's parent that was touched by the tool, is named "SandBag" p.Parent:Destroy() -- Destroy the touched part's parent script.Parent:Destroy() -- Destroy the tool along with it end end)
You can just use the Touched event's parameter, to destroy the part
You can look at this if you need to, https://developer.roblox.com/en-us/api-reference/event/BasePart/Touched