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

how do i give out points to an entire team on roblox?

what is the peice of code that i should use when im doing something to all of the members of a team?

5 comments

1

This isn't a request site...

0

You would get all the players on that team and loop through each player. Then give them the points.

0

This isn't a request site, what you're trying to do is not valid with the site rules.

0

HoW ElSe WoUlD I Do iT, I cAnT fInD aNyThInG aBoUt It OnLiNe

1

^ Have you at least tried then? If so, tell us what you’re having problems with. If not because you don’t know where to start, you should learn the basics first.

2 answers

Here is all you need to know on how to learn this:

http://wiki.roblox.com/index.php?title=Loops (Or click this: http://wiki.roblox.com/index.php?title=Loops#For)

You can also check out this: http://wiki.roblox.com/index.php?title=API:Class/Teams

And, how playerpoints work:

http://wiki.roblox.com/index.php?title=Player_Points

Or, if you mean leaderstats:

http://wiki.roblox.com/index.php?title=Leaderboards

There you go.

This is not a request site, so people won't just give out the answer without you putting in effort. If you read some of this, then it'll help.

Also, here are basics of coding: http://wiki.roblox.com/index.php?title=Getting_Started

for i,v in pairs(game:GetService("Teams"):GetChildren()) do
	if v.Name == "[TEAMNAME]" then
		for i,e in pairs(v:GetChildren()) do
			if e:IsA("Player") then
				e.Leaderstats.Points.Value = [Amount of points]
			end
		end
	end
end

I'm pretty sure there's a more compact way, but this should work.

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