How can i do it?
This is the whole code:
let factionValueLeaderBoardList = []
for (const player of world.getPlayers()) {
const facId = getScore('fac_id', player)
const facName = `fac${facId}`
const value = metricNumbers(getScore('fac_v', facName))
factionValueLeaderBoardList.push(`§d${facName}§5: `, `§2$§a${value}\n`)
}
//factionValueLeaderBoardList.sort() just sorts the whole thing so also the name so idk how to do it
player.sendMessage(factionValueLeaderBoardList)```