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 » Game Design
Home Search
 

Re: If Nobody Is In A Team Then...

Previous Thread :: Next Thread 
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 08:02 AM
bump


Tornadoes Are Made Of Tomatoes
Report Abuse
Roardorak is not online. 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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 10:18 AM
sooo. Bump


Still Better Than Twilight
Report Abuse
Roardorak is not online. 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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 01:53 PM
doesnt work :/

bump


Still Better Than Twilight
Report Abuse
LaeMVP is online. 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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 02:36 PM
nope :/ doesnt work



Still Better Than Twilight
Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
30 Apr 2017 02:39 PM
It was just an example.
Report Abuse
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 03:09 PM
ok


Still Better Than Twilight
Report Abuse
K_Load is not online. 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 is not online. 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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
30 Apr 2017 05:51 PM
dang it, I cant get these into a loop.


Still Better Than Twilight
Report Abuse
Roardorak is not online. 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
MCBombGaming is online. MCBombGaming
Joined: 22 Jun 2015
Total Posts: 111
02 May 2017 07:41 PM
ok nvm I got one to work


Still Better Than Twilight
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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