I'm making a Damage meter Gui, In order to make it, I need to know how to get the top 4 best damage dealers first then sort them in order so it's top 1, top 2, top 3, top 4, and the gui should update every 1 second or more.
Now, this is my epic failed attempt:
while wait(2) do
for i,v in ipairs(Game:GetService("Players"):GetPlayers()) do local Dps=v:WaitForChild("TotalDamage") local DpsGui=v:WaitForChild("HealthGui"):WaitForChild("DamageFrame")
print(math.max(Dps.Value,i)) end end
Could anyone explain me how to get the top 4 best damagers after getting each player's Stored NumberValue?
