Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
|
| 26 Jun 2016 10:23 PM |
repeat wait() local players = game.Teams.Playing:GetPlayers() until #players == 1 print("1 player")
error: 23:21:36.941 - Team:GetPlayers() is disabled 23:21:36.941 - Script 'Workspace.CONTROLLER', Line 126 23:21:36.941 - Stack End |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2016 10:24 PM |
| It hasn't been enabled yet so you can't do it with that function. |
|
|
| Report Abuse |
|
|
Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
| |
|
|
| 26 Jun 2016 10:28 PM |
| Create your own function that'll return an array of people that are on that team. Do so by iterating through all of the players and comparing their TeamColor to a certain TeamColor. If it's a match, insert the player into a table that is created at the beginning of the function. Once you've finished the iterations, return the table. |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jun 2016 10:29 PM |
:) https://www.roblox.com/Team-Functions-item?id=440435752
|
|
|
| Report Abuse |
|
|
Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
| |
|
Fangous
|
  |
| Joined: 03 Jul 2010 |
| Total Posts: 4448 |
|
|
| 26 Jun 2016 10:46 PM |
| oh devvince i didnt see ur post i just did it like the other one said. it was a little hacky for me but i figured it out |
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jun 2016 10:47 PM |
Mine includes two functions.
One gets the players on that team and one returns all teams with all players on each one.
|
|
|
| Report Abuse |
|
|
j_ffrey
|
  |
| Joined: 12 Apr 2015 |
| Total Posts: 262 |
|
|
| 26 Jun 2016 10:48 PM |
dev always has a model for everything hes that cool
|
|
|
| Report Abuse |
|
|
DevVince
|
  |
| Joined: 08 Nov 2008 |
| Total Posts: 9245 |
|
|
| 26 Jun 2016 10:50 PM |
I just made scripts I post a lot into models so it's easier because people ask for the same type a lot.
|
|
|
| Report Abuse |
|
|