generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Find How Many Players Are On A Team?

Previous Thread :: Next Thread 
ChuckXZ is not online. ChuckXZ
Joined: 26 Jan 2012
Total Posts: 2996
17 Feb 2015 06:59 PM
I'm working on a round system. I want to tp the teams on opposite sides, but I don't know how to find all the players on a certain team. CAn anyone show me a way?


+1 Post.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
17 Feb 2015 07:00 PM
http://wiki.roblox.com/index.php?title=Common_Code_Snippets#Get_a_team.27s_players

Usage:

local playersOnTeam = getPlayers(game.Teams.SomeTeam)
print(#playersOnTeam)
--> 8
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
17 Feb 2015 07:00 PM
ahum LMaD tshirt?
Report Abuse
ChuckXZ is not online. ChuckXZ
Joined: 26 Jan 2012
Total Posts: 2996
17 Feb 2015 07:04 PM
Also, is there any way I can track the amount people on the team?


+1 Post.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
17 Feb 2015 07:09 PM
http://wiki.roblox.com/index.php?title=Common_Code_Snippets#Detect_when_a_player_changes_teams

You'll have to maintain your own lists of who's on each team
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
17 Feb 2015 07:12 PM
Or just rerun the first code he gave you every time the second code he gave you runs.

Also A+ job Seranok for listing wiki pages that exactly answer the question

~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~
Report Abuse
ChuckXZ is not online. ChuckXZ
Joined: 26 Jan 2012
Total Posts: 2996
21 Feb 2015 10:00 AM
bump


+1 Post.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
21 Feb 2015 10:02 AM
Lol, I knew someone was going to bring up that page.

Sorry chuck, but your question has already been answered. If you can't figure out how to do what you want from what Seranok gave you, you'll have to do some reading up on tables.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image