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

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

Asked by 6 years ago

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

1
This isn't a request site... brokenVectors 525 — 6y
0
You would get all the players on that team and loop through each player. Then give them the points. MooMooThalahlah 421 — 6y
0
This isn't a request site, what you're trying to do is not valid with the site rules. magicguy78942 238 — 6y
0
HoW ElSe WoUlD I Do iT, I cAnT fInD aNyThInG aBoUt It OnLiNe SLENDERMANCLONE -27 — 6y
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. User#20279 0 — 6y

Closed as Not Constructive by theCJarmy7 and Shawnyg

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

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

Ad
Log in to vote
-1
Answered by
oilsauce 196
6 years ago
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.