What's the point of using UpdateAsync if it just results in constant warnings

I’m trying to use UpdateAsync() to update player points when it changes (because everyone says using SetAsync() on PlayerRemoved is sinful), however this just results in a barrage of warnings. Literally 1 fire, and I’m already met with

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

I don’t how it’s full. I literally only called it once, and chucking a print in the function only prints once. So it’s not like it’s being spammed.

--// Update PlayerData.Points
LeaderstatsPoints.Changed:Connect(function()
	Points.Value = LeaderstatsPoints.Value
	
	local Success, Error = pcall(function()
		PointsData:UpdateAsync(player.UserId, function(oldValue)
			local NewValue = oldValue or 0
			NewValue = LeaderstatsPoints.Value
			
			return NewValue
		end)
	end)
end)
1 Like

Would it be possible to update the points when they leave? That might work better.

Maybe it is doing this?

leaderstatsPoints.Changed --> Update and change Points.Value

Maybe when Points.Value updates it calls it again, endlessly changing it?

2 Likes

This can be avoided with autosaving and data cacheing. Basically you want to create a variable that is a table which stores all players leaderstats. Then, whenever you save you want to save to the cache instead of saving directly. Once the player leaves you can then save the information in the cache and then wipe their key from the cache. However, this method isn’t perfect.