Global Leaderbaord Using String Values

Hello,

I am trying to create a global leaderboard for my game, but the game uses String Values to overcome the IntValue Limit.

The values are stored in the data store like this

It uses the player’s UserId for the key, I have tried using GetSortedAsync but to no success.

Any help would be appreciated!

An OrderedDataStore is essentially a GlobalDataStore with the exception that stored values must be positive integers. It exposes a method GetSortedAsync() which allows inspection of the entries in sorted order using a DataStorePages object.

And the int limit is 9.223 Quintillion, and if u want to save more than tht, and isn’t satisfied with tht amount, I suggest using this dude’s solution.

1 Like

So how would I script a top player for example for gems?

I edited the reply, check it out.

I have seen his way, but I don’t need to store it I just wanna retrieve the player who has for example the most sword

Iam afraid that u mite need to use another datastore for that, an ordered on to b specific.

1 Like

you can use tonumber(string) to make it a number

1 Like

It’s saved as a number in the string e.g 20000

Edit:

You can Use Ordered Data Store with string values as long as they are stored as a number and not an abbreviation

What do you mean by that?

feuiewhfuerhfuewh