I'm making a game and i wan tall the guys when they died they loose there items in the backpack.
COMMUNITY QUESTION
How to make a script that removes all items in the backpack on death?
2 answers
Hi. I made this script for you.
Script:
Players=Game:GetService("Players")
Players.PlayerAdded:connect(function(Player)
Player.CharacterAddedd:connect(function(Character)
Humanoid = Character:FindFirstChild("Humanoid")
Backpack = Player:FindFirstChild("Backpack")
Humanoid.Died:connect(function()
Backpack:Destroy()
end)
end)
end)
I hope it works for you. Enjoy.
- Kratos232
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
You shouldn't have to have a script for this, because I am pretty sure items get removed by default when a player dies. Would you happen to be referring to starterpack items?
Yes starterpack items.