Hello,
I have an GUI shop where you can buy stuff. So my question is. Example, I buy Gravity Coil then it stays until I leave from Game.
My question is, I've tried to make a code which will remove everything from Backpack when you've died 3 times.
if Player.leaderstats.Deaths.Value == 3 then
Player.leaderstats.Deaths.Value = Player.leaderstats.Deaths.Value - 3
Player.Backpack:ClearAllChildren()
Right now it only removes one item from Backpack, but if you respawn then it comes back. How can I fix that? Thanks!

4 comments
Hello, I got many "Items/Tools" how can I enter all there?
I edited the script so it should loop through all the Objects in Backpack and delete them all.
Sir, How to make it still delete items. Item's come from StarterGear as well, so if player dies before "3", he would keep items until he got 3 deaths. Thanks :)
Edited.