I need help with this if you could help I'll be thankful. Thanks!
function onTouch(part) local Player = game.Players:FindFirstChild(part.Parent.Name) if Player ~= nil then local Sword = part.Parent:FindFirstChild("Sword") local SwordInBackpack = Player.Backpack:FindFirstChild("Sword") if (Sword ~= nil) then Sword:Destroy() end if (SwordInBackpack ~= nil) then SwordInBackpack:Destroy() end end end script.Parent.Touched:connect(onTouch)
This should work
Closed as Not Constructive by M39a9am3R
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?