I'm sorry if this is a big script to ask for, i've just been racking my brain over this for months and nothing ever seems to work. Is it even possible to do this?
COMMUNITY QUESTION
How can I make a script find a player with the most knockouts/wipeouts in a leaderboard?
1 answer
To find most KO's:
topko = 0
person = "No one"
for _,v in pairs(game.Players:getChildren()) do
if v:findFirstChild("leaderstats") then
if v.leaderstats.knockouts.Value > topko then --You'll need to change 'knockouts' to whatever the name of the KO stat is
topko = v.leaderstats.knockouts.Value --Change it here too
person = v.Name
end
end
end
wait()
print(person.." had the most knockouts with "..topko.."!")
To find most WO's:
topwo = 0
person = "No one"
for _,v in pairs(game.Players:getChildren()) do
if v:findFirstChild("leaderstats") then
if v.leaderstats.wipeouts.Value > topwo then --You'll need to change 'wipeouts' to whatever the name of the KO stat is
topwo = v.leaderstats.wipeouts.Value --Change it here too
person = v.Name
end
end
end
wait()
print(person.." had the most wipeouts with "..topwo.."!")
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Include code you have tried, this is not a request site