Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 03 Aug 2012 07:42 PM |
--Xnite515--
for i, c in pairs(game.Teams.Team:GetChildren()) do --Change team to which team is the home team. print("Index: ", index) print("Child: ", child) if index <= 5 then a = Instance.new("Message",workspace) print("5") a.Text = "There needs to be 5 TRA members to start raiding" wait(1) repeat until index >= 5 do a:Remove() end end end |
|
|
| Report Abuse |
|
|
TinpotOps
|
  |
| Joined: 22 Jul 2012 |
| Total Posts: 813 |
|
|
| 03 Aug 2012 07:59 PM |
If the output doesn't work or nothing shows up, you usually need to reset and then try again. (:
your "friendly" TGI helper. |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
| |
|
Osyris
|
  |
| Joined: 27 Oct 2007 |
| Total Posts: 4321 |
|
|
| 05 Aug 2012 11:35 PM |
"for i, c in pairs(game.Teams.Team:GetChildren()) do --Change team to which team is the home team."
What are the children of "Team"? |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 05 Aug 2012 11:46 PM |
Team is the team's name lol.
Children: The players in it. |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 12:12 AM |
I'm not sure if that would work. Here's my best attempt at checking the number of players:
while true do local num=0 for i, c in pairs(game.Players:GetChildren()) do if c.TeamColor==game.Teams["TEAMNAMEHERE"].TeamColor then num=num+1 end end if num < 5 then a = Instance.new("Message",workspace) print("5") a.Text = "There needs to be 5 TRA members to start raiding" wait(1) a:destroy() else wait(5) end end |
|
|
| Report Abuse |
|
|
|
| 06 Aug 2012 12:22 AM |
g = game.Teams.Team:GetPlayers() --Change team to which team is the home team. index = #g if index <= 5 then a = Instance.new("Message",workspace) print("5") a.Text = "There needs to be 5 TRA members to start raiding" wait(1) repeat wait() until index >= 5 a:Remove() end
|
|
|
| Report Abuse |
|
|