GetSortedAsync no working when value was table?

so I have a datastore that saving table data but when I try to use GetSortedAsync on it just print out {}

-- data should be like
  ["Data1"] = 1,
  ["Data2"] = 2
local DataStoreService = game:GetService("DataStoreService")
local DS = DataStoreService:GetOrderedDataStore("PlayerDatas")
print(DS:GetSortedAsync(false, 10):GetCurrentPage())
-- output:
-- {}

datastore only has one data

You can’t save tables in an Ordered Data Store, they are designed to save positive integers. You can only save tables in a Global Data Store.

oh okay, but when i change back to number of the data, it same only will print out {}

Odd, it works fine for me:

oh so my data need save in GetOrderedDataStore and not GetDataStore?

Ordered data stores only accept integers, not tables. This is why it doesn’t save. The error you are having is probably 103: Array is not allowed in data stores. So you should save it in a normal data store and get the data using the function GetDataStore.