How can I have custom leaderboard sorting?

The goal
So, in my game each player has a certain amount of fans. I would like players to compete with each other to see who can get the most fans, so I would need the leaderboard to be properly ranked.

The issue
The issue is that at some point the numbers get too large to be read efficiently, for example 2,560,000,000 fans is too long so I shorten it to 2.54B. However, the roblox leaderboard does not recognize the B when ranking players and so it would put 2.54B fans below 3 fans (for example).

Tried solution
I have tried to add another int variable just for ranking players:


This however feels sloppy to me and I would like the leaderboard to only have fans on it, not some arbitrary rank number.

Basically, I would like a way to order players on the leaderboard in my own way, without having to program an entire custom leaderboard gui. I know its possible since you can see it in how Jailbreak ranks players by money.

5 Likes

I’m not sure if this would work, but it’s good to try, it’s a hacky way though.

Certain object values aren’t displayed in the leaderstats when inserted into the folder, stuff like CFrame and Vector3s. Maybe you can set the actually money value to a Vector3 value object, and hopefully it actually recognizes that object even though it’s not displayed and it sorts relative to it.

2 Likes

Would I make the x,y,z values be the integer? idk how I would implement this

Choose one of the component to be the integer, like the X component

Ok, I will try it this method and let you know if it works

1 Like

Uhm, just dont parent the rank IntValue to the leaderstats?

1 Like

Bumping this. Has anyone found a simple solution for this? It would be convenient to be able to keep the default roblox leaderboard and fix this problem

1 Like

I wish there was a way to sort it like table.sort() :face_with_raised_eyebrow:

1 Like