December 31, 2017, 5:29pm
So im needing to make a “leaderboard” system that displays everyones stats very quickly (just in one server) currently I am using Ordered Datastores but these take to long to update/change (6 seconds between sending.) and i need the “leaderboarding” done in like 1 second.
So im wondering how the Core-GUI’s leaderboard does it. Please help!
December 31, 2017, 5:47pm
I usually manage all stats in a table server side. Every time a user stat is updated and checked for validity the leaderboard stat is changed. Here’s a great article on leaderboards.
Here’s the type of table I use to store data.
You seem to know datastore, I save the players data every x seconds and when they leave. I simply load the table data if their datastore exists.
December 31, 2017, 5:48pm
thats not my issue my issue is i need to know how the leaderboard finds the player with the most KO’s (or something) else ranks them first, finds the second person, ranked them second etc.
It takes a list of all players in the server and their corresponding stats, and then sorts them according to one of those stats. It’s not cross-server and it doesn’t use datastores.
December 31, 2017, 5:52pm
how does it sort them… thats my question.
December 31, 2017, 5:53pm
December 31, 2017, 6:38pm
so this is the code I have but instead it makes it so the person with the most gold goes second and the person with less gold goes first and sometimes the second player is labeled as “nil”
You wanna use table.sort to compile a leaderboard.
January 2, 2018, 2:47am
I believe you’re looking for this:
entry['Frame'].BackgroundColor3 = Color3.new(0,1,1)
Spawn(function() TweenProperty(entry['Frame'],'BackgroundTransparency',1,.5,.5) end)
the basic update for the playerlist mode's state,
assures the order and length of the player frames
for i,val in ipairs(PlayerFrames) do
MiddleFrames[i] = val['Frame']
for i = #PlayerFrames + 1,#MiddleFrames,1 do
MiddleFrames[i] = nil