Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you reset the roblox backpack once somone dies? [closed]

Asked by 6 years ago

How do you reset the roblox backpack once someone dies because right now when someone dies the items in there backpack stays there!

Closed as Not Constructive by theCJarmy7, brokenVectors, and User#21908

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?

2 answers

Log in to vote
1
Answered by
royee354 129
6 years ago
Edited 6 years ago

Don't ask people to make scripts for you, this isn't a "make me a script request website". When you have an error on your own script, then come and ask a question about it. If you want to learn how to script there are amazing sites like the Roblox Wiki to help you out: http://wiki.roblox.com/index.php?title=Main_Page

You should also read: https://scriptinghelpers.org/blog/posting-good-questions-and-answers-on-scripting-helpers

0
ok ISkyTryk -5 — 6y
Ad
Log in to vote
1
Answered by
theCJarmy7 1293 Moderation Voter
6 years ago
game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").Died:Connect(function)
            --code that will be run when any player in the game dies
        end)
    end)
end)

To actually clear a player's backpack, you could ClearAllChildren

player.Backpack:ClearAllChildren()

And that would remove everything in the backpack.

0
ok thanks! ISkyTryk -5 — 6y