Alright, so I am looking to make a basic leaderboard for my game. Each player has a folder named leaderstats and has an IntValue named “Kills” inside of it.
I have a TextLabel in replicated storage named “Template.”
I have a part with a surface gui named “leaderboard” in workspace.
How could I make it so there are text labels that are sorted from the most kills to the least kills? I would also like to have the player’s name next to their kills if it is possible
I know that table.sort can be used in some way but I don’t really know what it does or how to use it.
Oh so you’re talking about like a server based leaderboard alrighty then, here’s the thing with making leaderboards (Regardless of global or server)
I think you still need to follow the code that the global leaderboard gives you, as it does require some UpdateAsync related stuff and GetFlippingPageSomethingSortedASync to organize how the place system will work
Unless if you just want the default leaderboard, but I don’t think that’s not what you want
Oh boy… this sounds a bit more complicated than I was expecting. I originally just figured I could have a table with everyone in the game and their kills. I could update the table about every second or so and use table.sort() to organize them from greatest to least.
basically, I want to just perfectly recreate the leaderstats gui on the playerlist on a surface gui. I’ll make sure to look through the resource you sent and see if I can find anything that can help me.
Oh, yeah I think you’d need to use some RemoteEvent configuration & tables I believe to make that happen? Unless if you want to handle it on the server
Im going to handle it on the server. I think I have it mostly figured out, I just need to figure out how to use table.sort() to organize a table based on their kills.
(I have their kills saved with their name in a dictionary.)