So, I followed a Tutorial , but my code doesn't work for some reason. (This is my first question on this website and also sorry for bad english) code:
local DataStoreService = game:GetService("DataStoreService")
local PlayerLevelStore = DataStoreService:GetOrderedDataStore("PlayerLevelStore")
-- Put the data in
local PlayerLevels = {
["CalledMonk12"] = 61,
["SallyWacky"] = 25,
["NancyPlays"] = 82,
["AwasomeMinecraftYT"] = 11,
["Daimian111"] = 111
}
for User, Level in pairs(PlayerLevels) do
PlayerLevelStore:SetAsync(User, Level)
end
local Pages = PlayerLevelStore:GetSortedAsync(false, 3)
while wait() do
local Data = Pages:GetCurrentPage()
for i, v in pairs(Data) do
print(v.Key)
print(" - ")
print(v.Value)
end
if Pages.IsFinished() then
break
else
print("---------------------")
-- Next page
Pages:AdvanceToNextPageAsync()
end
end
output:
nil
-
nil
nil
-
nil
nil
-
nil
04:49:12.055 - ServerScriptService.Script:22: attempt to call a boolean value
More information: Testng style: I use "Run" In roblox studio Script type and location: Script type: Server script Script location: ServerScriptService

5 comments
should "Pages.IsFinished()" be "Pages:IsFinished()"?
VAHMPIN, oh, thanks, I don't get the error anymore, but it still prints nil.
check my answer.
It doesn't work, now I get table: 0x3ed243d9ded208e2 intead of the nil
sorry, didn't get notified of the reply. I don't do about data stores, i don't know a lot.