Creating a global Leaderboard by accessing a values in a table

Leave a like if you can see the post please, so experienced devs can see it .

  1. i want to create a global leaderboard for kills stat which is inside player data table!

  2. Most global leaderboards tutorial assume i am using single value in saved data. for example a data store only for coins which make it easier to make a global leaderboard for it! i couldnt find a tutorial teaching how to access and sort a value inside array of values.
    is there a way to sort data of player 's data table or i should create separate data stores for kills , coins and level ?

local DEFAULT_PLAYER_DATA = {
	[Constants.StatsNames.Coins] = 0,
	[Constants.StatsNames.Kills] = 0,

	-- Upgrade data
	[Constants.StatsNames.Level] = 1,
	[Constants.StatsNames.XP] = 0,



}

i tried to use ListKeysAsync() but i couldnt make it work. i guess the way i save data need to have keys . is there any complete tutorial ? i already read the documentations and couldnt make it work . i am still a beginner . help please . i want a tutorial teaching me how data needs to be saved in order to be used with ListKeysAsync. My Data is a table containing keys like coins , level , xp … feel free to ask me any questions .

4 Likes