How would i get leaderboard records based of score?

for example: im trying to list all the players that have a score of 10.
would be even better if i could limit it so: 50 players with a score of 10.

edit: using godot 4

Hello @axilirate,

The only way to do this would be to list all records in order, collect all the results with the score you’re looking for and then return after a higher score is found.

Can you elaborate on why you’d need to find all players with the same score?

Best.

so the score system is based of level reached, so a lot of players in the leaderboards will just players that are on the same level as them.

i want to display 15 players on the same level, 15 players on the levels above and 15 on the levels below.

ive done it using sql_query since i couldnt find an elegant way via the api.