Getting the position of a Key in an OrderedDataStore



As a Roblox developer, it is currently too hard/extremely inefficient to find the position of a certain key in an OrderedDataStore. Right now, you would need to use a for loop to go through every single key top to bottom until you reach the desired key, and then use the loop’s index variable for the position.

Something like :GetPositionAsync() would be extremely useful for stuff like say a global rank display, that tells the player what rank they are without being near the top.


Support, however maybe to lessen DataStore requests, it would be better if we had a GetAsync function that returned the value and the position, e.g:

local Value, Position = OrderedDataStore:GetAsync(Key)