local function possessionAlgorithm (time1,time2) --Here time 1 and 2 is the amount of time both teams had the ball
local total = time1+time2
local team1Possession = (time1/total) * 100
local team2Possession = (time2/total) * 100
local possessionStats = {
["Green"] = team1Possession,
["Red"] = team2Possession
}
return possessionStats
end
How would I be able to get Green Team player value and the other player value and add them together any help is appreciated
local Teams = game:GetService('Teams');
local Amount = 0
for _, Player in ipairs(Teams.Red:GetPlayers()) do
Amount = Amount + Player.leaderstats.Points.Value
end