hi i'm working on a matchmaking game but i want to sort this table but it's not working

game.ReplicatedStorage.server1.count.Changed:Connect(function()
	for i,v in pairs(joinplayers) do
		table.sort(joinplayers,i)
	end
end)