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
|
  |
| 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 |
|
|
| |
|
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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 26 Jan 2012 |
| Total Posts: 2996 |
|
| |
|
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 |
|
|