This time its about toolsaving…
Theres no error in the output,Heres the code
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("BackpackSave")
game.Players.PlayerAdded:Connect(function(player)
pcall(function()
local tool = DataStore.GetAsync("User_"..player.UserId)
if tool then
for i,v in pairs(tool) do
local toolFound = game.ReplicatedStorage.Tools:FindFirstChild(v)
if toolFound then
toolFound:Clone().Parent = player.Backpack
toolFound:Clone().Parent = player.StarterGear
end
end
end
end)
end)
game.Players.PlayerRemoving:Connect(function(player)
pcall(function()
local toolsave = {}
for i,tool in pairs(player.Backpack:GetChildren()) do
if tool then
table.insert(toolsave,tool.Name)
end
end
DataStore.SetAsync("User_"..player.UserId,toolsave)
end)
end)
You are using pcall which is used to prevent errors from stopping your code from running, meaning errors will not show unless you make them. Could you try removing your pcall and print out what error occurs?