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 » Scripting Helpers
Home Search
 

Re: How To Check If A Team Is Empty?

Previous Thread :: Next Thread 
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
15 Nov 2014 08:16 AM
^

Thanks
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
15 Nov 2014 08:37 AM
Just make each player have a number value and make it add to a value inside the team and if the value inside the team equals 0 then it'll guess it's empty. But it'll take a little scripting.
Report Abuse
FadedExistence is not online. FadedExistence
Joined: 28 Jun 2011
Total Posts: 818
15 Nov 2014 08:50 AM
^[Above]
Wut?
------


Script:

--==Fadexistence==--
if game.Teams.TEAMNAME == nil
then
print 'Team not found'
end
Report Abuse
Meowcatmaster is not online. Meowcatmaster
Joined: 20 Oct 2012
Total Posts: 769
15 Nov 2014 08:53 AM
Here let me explain a little better, I was rushed at first.
Well lets say each team has a value in it.
And the value inside it increases based on the players with that teams color.
And if that value of the team is 0 then it'll make the team have no players in it, Therefore the team is empty.
Was that clear enough or do I need to explain even more clear?
Report Abuse
FadedExistence is not online. FadedExistence
Joined: 28 Jun 2011
Total Posts: 818
15 Nov 2014 09:01 AM
Oh I was going to say delete the team if no ones on it and player re create when triggered (Player join etc.), Although you could use the team score property to track all players on the team.
Report Abuse
rowerowe71 is not online. rowerowe71
Joined: 14 Apr 2013
Total Posts: 1999
15 Nov 2014 06:16 PM
Thanks
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
15 Nov 2014 06:31 PM
isEmpty = true
for k, v in next, game.Players:GetPlayers() do
if v.TeamColor == targetColor then
isEmpty = false
end
end
Report Abuse
Happywalker is not online. Happywalker
Joined: 05 Mar 2010
Total Posts: 3672
15 Nov 2014 06:43 PM
a = Team:GetChildren()

for i, 1 #a do

i Is the amount of Children in a
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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