I made an item saving/loading script for someone recently, and it works, for the most part. Recently he told me that, though it does save the items, it occasionally duplicates them or removes them. I've tried examining it, but I can't find much of a reason for either problem.
The tools are stored in ReplicatedStorage, and copied into the player's inventory.
local PlayersItems = game:GetService("DataStoreService"):GetDataStore("Items") function SaveData(Player) local Items = {} for i,Item in ipairs(Player.Backpack:GetChildren()) do if game.ReplicatedStorage:FindFirstChild(Item.Name) ~= nil then if game.ReplicatedStorage[Item.Name]:IsA("Tool") then table.insert(Items, Item.Name) end end end PlayersItems:SetAsync(Player.UserId, Items) end function LoadData(Player) if PlayersItems:GetAsync(Player.UserId) ~= nil then for i,ToolName in ipairs(PlayersItems:GetAsync(Player.UserId)) do local Tool = game.ReplicatedStorage[ToolName] Tool:Clone().Parent = Player.Backpack end end end game.Players.PlayerAdded:connect(function(Player) game.Players:WaitForChild(Player.Name) Player:WaitForChild("Backpack") LoadData(Player) Player.CharacterAdded:connect(function() LoadData(Player) end) game.Players.PlayerRemoving:connect(function(Player) SaveData(Player) end) Player.Backpack.ChildAdded:connect(function() SaveData(Player) end) end)
It looks like your player or the ReplicatedStorage has the same item twice.