of     1   

Raildex
#182991486Thursday, February 04, 2016 6:29 PM GMT

How would i get all the players of the team with color "Crimson" and add 5000 to all of their cash values in leaderstats?
NovusTheory
#182991598Thursday, February 04, 2016 6:33 PM GMT

loop players and check TeamColor
ElectoStriking
#182991655Thursday, February 04, 2016 6:34 PM GMT

for i,v in pairs (game.Players:GetChildren()) do if v.TeamColor = "Crimson" then -- add points val end end
jumpykilldestroy
#182991814Thursday, February 04, 2016 6:39 PM GMT

Team=BrickColor.new'Crimson'--team to change stats on Stat='cash'--stat to change for i,v in next,game:service'Players':GetPlayers''do local Leaderstats=v:FindFirstChild'leaderstats' if v.TeamColor==Team and Leaderstats~=nil then local Value=Leaderstats:FindFirstChild(Stat) Value.Value=Value.Value+50000 end end
ez_street
#182993861Thursday, February 04, 2016 7:34 PM GMT

Color = "Crimson" for i, v in pairs(game.Players:GetChildren()) do if v.TeamColor = Color then if v:FindFirstChild("leaderstats") then if v.leaderstats:FindFirstChild("Cash") then v.leaderstats.Cash.Value = v.leaderstats.Cash.Value + 5000 end end end end

    of     1