Hello! First off, I am very confused with this. I’m not new when it comes to datastores. So, I’m not sure why it’s bugged. It started occurring once I changed the integer values to number values while I use SetAsync(). Here’s the code:
for _, player in pairs(game.Players:GetPlayers()) do
MissionsLeaderboard3:SetAsync(player.UserId, math.floor(player.leaderstats.Rebirths.Value))
end
First of all it would help to post the error thats being outputted.
Also updating all the player’s values at once can be quite expensive. DataStores are not very effective at writing quickly. It would be better to save the data when the player leaves.