OrderedDataStore Help

Hi, I am making a leaderboard for the Most Time played. The time is in minutes and the time counting works and then the leaderboard updates but the time doesn’t. Say I joined with a saved 7 minutes the leaderboard shows ‘7’ but after 2 minutes (time to wait before refresh) I check the Database with:

local dataStoreService = game:GetService("DataStoreService")
local TimeDataStore = dataStoreService:GetOrderedDataStore("TimePlayed")
local pages2 = TimeDataStore:GetSortedAsync(false, 25)
local topTen2 = pages2:GetCurrentPage()

but after the two minutes the DB still shows the number ‘7’. I have an auto updater which updates the Database every 60 seconds with the new time so by the 2 minutes is up there should be ‘9’ minutes saved and ‘9’ should be shown on the Database.

1 Like