I keep getting an error when trying to save data

Hi, I’m trying to make a shop that saves the tools you’ve already bought by putting whatever you’ve purchased inside of a folder called “Tools” that is inside of the player. I want to save what tools are in this folder when the player leaves, and load them when the player rejoins. But when it saves the data I keep getting an error that says “attempt to call a nil value.” I’m very new to datastores so I’ve tried everything to fix it that is of my knowledge, if somebody could help me out that would be greatly appreciated!

Code:

local DataStoreService = game:GetService("DataStoreService")
local ToolsSave = DataStoreService:GetDataStore("ToolsSave")

game.Players.PlayerAdded:Connect(function(player)
	local Tools = Instance.new("Folder",player)
	Tools.Name = "Tools"
	
	local success, errormessage = pcall(function()
		local Tool = ToolsSave:GetAsync("-Tools",player.UserId)
		
		if Tool then
			for i,v in pairs(Tool) do
				local ToolFound = game.ServerStorage.Tools:FindFirstChild(v)
				if ToolFound then
					ToolFound:Clone().Parent = player.Backpack
					ToolFound:Clone().Parent = player.StarterGear
					ToolFound:Clone().Parent = player.Tools
				end
			end
		end
	end)
	
	if success then
		print("Worked")
	else
		warn(errormessage)
	end
	
end)

game.Players.PlayerRemoving:Connect(function(player)
	local success, errormessage = pcall(function()
		local ToolsSave = {}
		
		for i,tool in pairs(player.Tools:GetChildren()) do
			if tool then
				table.insert(ToolsSave,tool.Name)
				print(ToolsSave[1])
			end
		end
-- This line is where the error is
		ToolsSave:SetAsync("-Tools"..player.UserId,ToolsSave)
	end)
	
	if success then
		print("Worked")
	else
		warn(errormessage)
	end
	
end)

You named both the Table that contains the items to save, and the DataStore to save them, the exact same name(ToolsSave).
This means that the script is going to confuse one for another. You need to name your “ToolsSave” table to something different, such as “ToolsSaveTable”

Also, I don’t think this I what is causing that error in particular, but I think you meant to put the connector “…”, instead of a comma on the line 9 GetAsync(). You did it right the second time you used GetAsync(), but I think you made a typo on the first.