I have the save backpack working but I used a tutorial that actually worked perfectly the first try. There's only one small issue, when the player dies, any weapon that was purchased gets destroyed and upon respawn there is an extra starter pistol.
How do I make players keep inventory even when they die?
char.Humanoid.Died:Connect(function()
char.Humanoid:UnequipTools()
local old = player.StarterGear:GetChildren()
for i = 1, #old do
old[i]:Destroy()
end
local new = player.Backpack:GetChildren()
for i = 1, #new do
new[i].Parent = player.StarterGear
end
end)
Here is the function I believe is the reason for some weird stuff happening.
Again this tutorial worked, which is great, but now I'm not really sure what I'm looking at. Can anyone explain why this issue is happening? Thanks!

1 comment
I see what you're going for. I'll try it out. Thanks!