Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
for _,v in pairs(game.Teams.SomeTeamHere:GetPlayers()) do
     v.Points.Value = v.Points.Value + 1
end

1 comment

0

i had to add "leaderstats" between v and .points but it worked

This discussion is preserved as it was. New answers, comments, and votes are closed.