leaderboardstore = datastoreservice:GetOrderedDataStore(songName) if leaderboardstore:GetAsync(player.UserId) or 0 <player.Points.Value then debounce = true wait(1) leaderboardstore:SetAsync(player.UserId, player.Points.Value) player.Points.Value = 0 wait(10) debounce = false end end end)
im not too sure why, everything is correct with the leaderboard and stuff.
It's probably because the leaderboardstore value was already negative, and since it exists, it saved. I would also recommend, that you change or 0 <player.Points.Value to player.Points.Value > 0
This isn't part of the question, but you need a and if debounce = false in your if statement unless you are doing the debounce for a different reason