Team script help

How do I get the team’s total kills and then compare the other team’s kills to see who has the most kills

2 Likes

Well, we can’t just give you the script. Here’s what you can do.

  • First, get a table of the players in both teams. You can do this through the team:GetPlayers() method.
  • Secondly, iterate through the table. For each player, add their kills value to a main team counter.
  • Do this for both teams.
  • Compare the two values and do what you want with those two values. Remember to account for draws / ties.

If you need any help, let us know and we’ll help.

1 Like

How do I do this​​​​​​​​

local team = *team goes here*
for i,v in pairs(team:GetPlayers()) do
-- do stuff
end

I found an alternative to the script

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.