Here's the script.


Tool = "Dynamite"

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local player = game.Players:GetPlayerFromCharacter(hit.Parent)
        if player.Backpack:FindFirstChild(Tool) then
            player.Backpack:FindFirstChild(Tool):Destroy()
        end
        if hit.Parent:FindFirstChild(Tool) then
            hit.Parent:FindFirstChild(Tool):Destroy()
        end
    end
end)

2 comments

0

what do you mean "reset player's tools", and what did you define "Tool" as?

0

also, can you describe the intended purpose of this script, because currently, it only seems like you are only deleting one tool from the player