http://wiki.roblox.com/index.php?title=API:Class/Team/Score
This is deprecated, and I'd like to display the total amount of a team's kills on a GUI, so I'm all ears.
http://wiki.roblox.com/index.php?title=API:Class/Team/Score
This is deprecated, and I'd like to display the total amount of a team's kills on a GUI, so I'm all ears.
If you want to get the sum of the kills of every player on a certain team, you can add the number of kills of every player on a certain team together.
function GetKills(teamcolor)
local kills=0
for _,v in pairs(game.Players:GetPlayers())do
if v.TeamColor==teamcolor then
local l=v:FindFirstChild("leaderstats")
if l then
local k=l:FindFirstChild("Kills")
if k then
kills=kills+k.Value
end
end
end
end
return kills
end
where is the team color there must I enter the team color?
This discussion is preserved as it was. New answers, comments, and votes are closed.
8 comments
I think a team's score doesn't exist anymore. However, you can get the amount of stats a team has, like kills
That's what I literally just asked how to do.
Whoops. Not really correctly. What you're going to have to do is insert a value where kills will be added up, and create a script (or modify one) where everytime a person on that team gets a kill, it is added the total team kills.
*reading. And I'm not typing correctly either
This isn't a request site. W'e're not here to make scripts for you.
I do not recall asking you to make a script for me, I do recall implying I needed a method to get a team's total amount of kills. I apologize for your incompetence.
OP wasn't requesting a script, he was wondering on how to do something. And I told him how he could do it.
You would have to count them as the team kills people. Everytime a player on the team gets a kill, increment a team kill value. Reference said value later on.