Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i give points to members of a whole team?

Asked by 6 years ago

i want to give points to members of a team but i dont know how the teams and players are related and how to give all of the players points

do
if game.Players:GetChildren() == "Blue Team" then
    game.Players.LocalPlayer["Blue Team"].Parent.leaderstats.Points.Value = game.Players.LocalPlayer["Blue Team"].Parent.leaderstats.Points.Value +1

wait (1)
end
end


1 answer

Log in to vote
0
Answered by 6 years ago
for _,v in pairs(game.Teams.SomeTeamHere:GetPlayers()) do
     v.Points.Value = v.Points.Value + 1
end
0
i had to add "leaderstats" between v and .points but it worked SLENDERMANCLONE -27 — 6y
Ad

Answer this question