Data store issues

So first, I cant do datastores so this is right off yt, but this isn’t working?

local playerService = game:GetService("Players")
local dataStoreService = game:GetService("DataStoreService")
local toolsFolder = game.ServerStorage:WaitForChild("Tools")

local playerData = dataStoreService:GetDataStore("PlayerData")

local PlayerHandler = {}

local sessionData = {}

local function setupPlayerData(player)

	local playerUserId = player.UserId
	local data 
	local success, err = pcall(function()
		data = playerData:GetAsync(playerUserId)
	end)
	
	if success and data then 			
		sessionData[playerUserId] = data 
	else
		sessionData[playerUserId] = {Money = 0, Inventory = {}}
	end 
	
	PlayerHandler.LoadTools(player)
	player.CharacterAdded:Connect(function()
		PlayerHandler.LoadTools(player)
	end)
	
end
	
local function saveData(player)
	local playerUserId = player.UserId
	
	local success = pcall(function()
		playerData:SetAsync(playerUserId, sessionData[playerUserId])
	end)
	
end

function PlayerHandler.ChangeValue(player, name, value)
	local playerUserId = player.UserId
	
	if sessionData[playerUserId] then
		sessionData[playerUserId][name] = value 
	end
	
end

function PlayerHandler.CreateTool(player, name)
	local playerUserId = player.UserId
	
	if not player.Backpack:FindFirstChild(name) and player.Character and not player.Character:FindFirstChild(name) then
		
		local tool = toolsFolder:FindFirstChild(name):Clone()
		tool.Parent = player.Backpack
		
		local playerSessionData = sessionData[playerUserId]
		
		if not table.find(playerSessionData.Inventory, name) then
			table.insert(playerSessionData.Inventory, name)	
		end
		
		
	end
	
end

function PlayerHandler.LoadTools(player)
	
	local playerUserId = player.UserId
	
	for i, toolName in pairs(sessionData[playerUserId].Inventory) do
		print(toolName)
		PlayerHandler.CreateTool(player, toolName)
	end
	
end

playerService.PlayerAdded:Connect(setupPlayerData)
playerService.PlayerRemoving:Connect(saveData)

	

return PlayerHandler

the error it gets is this:

DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 1739938186

You’re probably sending too many requests to the DatastoreService so the queue is filling up. I’d assume this is because of the for loops in your code.

Try adding a cooldown to the saveData() function?