|
| 30 Apr 2017 07:49 AM |
How would i be able to check if anyone is on a team and if there is nobody is on a team, then do something?
Tornadoes Are Made Of Tomatoes |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 08:02 AM |
bump
Tornadoes Are Made Of Tomatoes |
|
|
| Report Abuse |
|
|
Roardorak
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 184 |
|
|
| 30 Apr 2017 09:10 AM |
local team = game.Teams.MyTeam:GetChildren (im not sure how to count the amount of children there are) if team == 0 then.... |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 09:48 AM |
teams dont have children. Its In The Player. In game.Players.Player.TeamColor
Tornadoes Are Made Of Tomatoes |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 10:18 AM |
sooo. Bump
Still Better Than Twilight |
|
|
| Report Abuse |
|
|
Roardorak
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 184 |
|
|
| 30 Apr 2017 01:05 PM |
wouldnt you be able to solve it then local team = myteam local plr = game.Players.LocalPlayer local teamValue1 = game.[wherever you put the numbervalue for the team] local teamValue2 = game.[wherever you put the numbervalue for the team] local teamValue3 = game.[wherever you put the numbervalue for the team] -- this script requires a value for how many players are on a team local function check() if plr.TeamColor == team then teamValue1.Value = teamValue1.Value + 1 end local function checkforPersons() if teamValue1.Value == 0 then -- do something end
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 01:53 PM |
doesnt work :/
bump
Still Better Than Twilight |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
|
| 30 Apr 2017 01:57 PM |
if #Team:GetPlayers() == 0 then print("There are no players on this team!") end |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 02:36 PM |
nope :/ doesnt work
Still Better Than Twilight |
|
|
| Report Abuse |
|
|
LaeMVP
|
  |
| Joined: 24 Jun 2013 |
| Total Posts: 4416 |
|
| |
|
|
| 30 Apr 2017 03:09 PM |
ok
Still Better Than Twilight |
|
|
| Report Abuse |
|
|
K_Load
|
  |
| Joined: 06 May 2010 |
| Total Posts: 3947 |
|
|
| 30 Apr 2017 03:16 PM |
local Amount_In_Team = 0
for i, v in pairs(game.Players:GetChildren()) do if v.Team == "put your team name in here" then Amount_In_Team = Amount_In_Team + 1 end end
if Amount_In_Team == 0 then -- do stuff if no 1 is in the team else -- do stuff if there are ppl on the team end
|
|
|
| Report Abuse |
|
|
K_Load
|
  |
| Joined: 06 May 2010 |
| Total Posts: 3947 |
|
|
| 30 Apr 2017 03:18 PM |
Lae's is probably a much easier/efficient way of doing it though.
|
|
|
| Report Abuse |
|
|
|
| 30 Apr 2017 05:51 PM |
dang it, I cant get these into a loop.
Still Better Than Twilight |
|
|
| Report Abuse |
|
|
Roardorak
|
  |
| Joined: 13 Jul 2014 |
| Total Posts: 184 |
|
|
| 02 May 2017 07:40 PM |
| btw mc mine probably does work but you didn't have any values |
|
|
| Report Abuse |
|
|
|
| 02 May 2017 07:41 PM |
ok nvm I got one to work
Still Better Than Twilight |
|
|
| Report Abuse |
|
|