okay sorry I'm bad at wording questions :P
okay so basically I'm working on a kill script that gives a kill and as assist. Inside the player (depending on how many times the player has been hit by different people) are folders that contain two values : the player, and how much damage they received. so basically, I want to get all the damage values, and I want to see which one is the 2nd biggest, that way I can find out who to give an assist or critical assists to.
so I thought if I put it into a table it might be able to find the biggest value, however I need to someone pair the damage value back to the correct player :( Here is my failed attempt:
local tag = player:GetChildren()
for i = 1,#tag do
if tag[i].Name == "FolderTag" then
local damages = {}
table.insert(damages,tag[i].damage.Value) -- damage value
local people = {}
table.insert(people,tag[I].creator.value) --player value
end
end
--and then code down here that finds the one with the greatest damage xD(and returns the player I guess)
sorry if this is wordy but I tried to explain it my best, thanks for any help,
~Bubs

1 comment
brilliant , thanks man ! :)