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 » Scripters
Home Search
 

Re: How do I make each player assigned to a team

Previous Thread :: Next Thread 
Cvear is not online. Cvear
Joined: 19 Apr 2011
Total Posts: 4426
25 Jul 2015 01:44 PM
I want 1 player assigned to each team so there are no 2 player teams
Report Abuse
AkaLua is not online. AkaLua
Joined: 27 Jul 2012
Total Posts: 526
25 Jul 2015 01:45 PM
How many teams are their?
Report Abuse
ImageLabel is not online. ImageLabel
Joined: 08 Dec 2012
Total Posts: 428
25 Jul 2015 01:46 PM
are you creating teams as players enter the server or is there a preset number of teams
Report Abuse
Cvear is not online. Cvear
Joined: 19 Apr 2011
Total Posts: 4426
25 Jul 2015 01:46 PM
There will be 12.
Report Abuse
Cvear is not online. Cvear
Joined: 19 Apr 2011
Total Posts: 4426
25 Jul 2015 01:47 PM
Preset number of teams and I want 1 player in each one.
Report Abuse
AkaLua is not online. AkaLua
Joined: 27 Jul 2012
Total Posts: 526
25 Jul 2015 02:10 PM
local teams = game.Teams:GetChildren()
local team = 1
for i,v in pairs(game.Players:GetChildren()) do
v.TeamColor = BrickColor.new(teams[team].TeamColor)
team = team+1
end
Report Abuse
ImageLabel is not online. ImageLabel
Joined: 08 Dec 2012
Total Posts: 428
25 Jul 2015 02:11 PM
Oh, I think you can simply instance a team every time a player, set its `AutoAssignable` property to false, and set the player's TeamColor property equal to that of the team's.

**You should probably also make sure to remove said team after the player leaves.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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