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: Limit Members for a Team.

Previous Thread :: Next Thread 
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
16 Apr 2012 04:00 PM
Is it possible to limit the amount of players can be on a team?

For example, three members would be the limit, but if another player tries to join, they won't be allowed.
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
16 Apr 2012 04:04 PM
~Bump.~
Report Abuse
blueboy112 is not online. blueboy112
Joined: 15 Apr 2009
Total Posts: 802
16 Apr 2012 04:06 PM
How many teams are there and what's the max players?
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
16 Apr 2012 04:41 PM
Ten teams. Three players each.
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
16 Apr 2012 04:42 PM
Thanks for any help in advance.
Report Abuse
hyyt8 is not online. hyyt8
Joined: 02 May 2007
Total Posts: 1760
16 Apr 2012 04:43 PM
It is possible. This was pretty much just answered in another thread.
http://www.roblox.com/Forum/ShowPost.aspx?PostID=66378748
Just add an if statement to make it so that the member cant join if the value is three.
Report Abuse
hyyt8 is not online. hyyt8
Joined: 02 May 2007
Total Posts: 1760
16 Apr 2012 04:44 PM
Also are they automatically joining the teams or are you using some other method?
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
16 Apr 2012 04:45 PM
Zomg, possibly(probably) first time I was quoted :D
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
17 Apr 2012 01:51 PM
So that you have a general idea, let me layout what I'm talking about.

There's actually eleven teams total, but one of them is the team all players start at when they spawn.

Then they must explore the map to find the other teams.

But often on games like this that I see, one team will have a ridiculous amount of players on it.

I want to prevent this so it's an even amount of three players each.

Thus a thirty player server.

Make sense?
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
17 Apr 2012 03:21 PM
~Bump.~
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
18 Apr 2012 09:13 AM
~Bump.~
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
18 Apr 2012 04:10 PM
~Bumpers.~
Report Abuse
L2000 is not online. L2000
Joined: 03 Apr 2008
Total Posts: 77448
18 Apr 2012 04:14 PM
Use COD3Y's script from the other thread. Reverse the if, and it's what you want.
Report Abuse
Swordphin123 is not online. Swordphin123
Joined: 09 Apr 2008
Total Posts: 5234
18 Apr 2012 04:40 PM
1. Make the max players 6, which it should be.
2. Use the ReBalanceTeams method.
Report Abuse
smfv3 is not online. smfv3
Joined: 04 Nov 2008
Total Posts: 370
19 Apr 2012 01:04 PM
What do you mean "which it should be?"
Report Abuse
CloneTrooper1019 is not online. CloneTrooper1019
Joined: 19 Jan 2009
Total Posts: 6227
19 Apr 2012 02:53 PM
function getCountOfPlayersOnTeam(teamBrickColor)
local people = game.Players:GetPlayers()
local a = 0
for i = 1,#people do
if people[i].TeamColor == BrickColor.new(teamBrickColor) then
a = a + 1
end
end
return a
end

-- Example:
if (#getCountOfPlayersOnTeam("Bright red")) > 10 then
-- etc.
end
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