After going server-side with my backpack save after death script I found another issue with it, It kinda works now but I have an issue that my script clones all the items in my backpack back when I die, but it doesn't clone the children of the tools
game:GetService("Players").PlayerAdded:Connect(function(player) repeat wait() until player.Character local char = player.Character char:WaitForChild("Humanoid").Died:Connect(function() local tools = player.Backpack:GetChildren() player.CharacterAdded:Connect(function() wait(1) for i,v in pairs(tools) do if v:IsA("Tool") then local clonedTool = v:Clone() clonedTool.Parent = player.Backpack end end end) end) end)
Here's a nifty solution for you. While I don't know what exactly was wrong with your original code, this modified code will do what you're hoping for.
Essentially, this will rename tools which you own to your tool, and then move them to ServerStorage, transporting them back to you after you respawn. If you need tools to be named something specific and this will interfere with something, I'm sure you can come up with a different method to sift through the tools in ServerStorage - such as a StringValue inside each tool.
I also made it so it will return the tool you are holding as well - which I moved by using FindFirstChildOfClass() inside of Character.
game:GetService("Players").PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(Character) for _,v in pairs(game.ServerStorage:GetChildren()) do if string.sub(v.Name, 1, string.len(player.Name)) == player.Name then v.Parent = player.Backpack end end Character:WaitForChild("Humanoid").Died:Connect(function() for _,v in pairs(player.Backpack:GetChildren()) do v.Parent = game.ServerStorage end if Character:FindFirstChildOfClass("Tool") ~= nil then Character:FindFirstChildOfClass("Tool").Name = (tostring(player).."'s tool") Character:FindFirstChildOfClass("Tool").Parent = game.ServerStorage end end) end) player:WaitForChild("Backpack").ChildAdded:Connect(function(tool) tool.Name = (tostring(player).."'s tool") end) end)
you have to do v:getchildren() its the only way