How do i compare leaderstats in a server to find the player with the highest stat?
Hello, i am working on a game and have decided to implement an NPC which will take appearance of a player with the highest cash in the server.
Currently i am using the "GetCharacterAppearanaceAsync()" function.
This function works and i have made it take appearance of me at the moment but i'd like this npc to take appearance of the player as mentioned in the title of this question.
I know how to find userIDs from usernames but what im stuck on is the comparing of the leaderstats; Do i use a linear search/Binary search/etc and if so how would i code it to connect with the leaderstats to find the highest score then match that score to the player with it?
In this scenario i am wanting the Cash to be compared considering this is the only stat i currently have on my game as of so far.
Thankyou very much for taking your time to read this :P