are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
|
| 16 Sep 2013 06:38 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player.Character then player.Character:MoveTo(100,1,100) a = game:Service("Teams"):GetChildren() player.Team = a.LobbyTeam ^^^^^^^^^^^^^^^^^^^^^^^^ I know it's super ugly What I'm trying to do is change the team of the player to the team named lobby team. Please help, I tried to do it myself before I asked.
(I know there are no ends) |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 16 Sep 2013 06:42 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player and player.Character then player.Character:MoveTo(Vector3.new(100,1,100)) a = game:Service("Teams"):GetTeams() player.Team = a[math.random(#a)] |
|
|
| Report Abuse |
|
|
are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
|
| 16 Sep 2013 06:42 PM |
| But I want it to be the specific team "Lobby" :( |
|
|
| Report Abuse |
|
|
are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
|
| 16 Sep 2013 06:46 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player.Character then player.Character:MoveTo(100,100,100) a = game:Service("Teams"):GetTeams() player.Team = Lobby
fix please |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 06:47 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player.Character then player.Character:MoveTo(100,100,100) player.TeamColor = game.Teams.Lobby.TeamColor |
|
|
| Report Abuse |
|
|
Java3D
|
  |
| Joined: 29 Jul 2012 |
| Total Posts: 1229 |
|
|
| 16 Sep 2013 06:48 PM |
for n,player in pairs(game.Players:GetPlayers())do if(player.Character)then player.Character:MoveTo(Vector3.new(100,100,100)) player.TeamColor = game:GetService("Teams").Lobby.TeamColor end end
~ 1Topcop |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 16 Sep 2013 06:48 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player and player.Character then player.Character:MoveTo(Vector3.new(100,1,100)) a = game:Service("Teams") player.TeamColor = a:FindFirstChild("Lobby") |
|
|
| Report Abuse |
|
|
ZachBloxx
|
  |
| Joined: 26 Jun 2013 |
| Total Posts: 2833 |
|
|
| 16 Sep 2013 06:49 PM |
| Haven't seen you in a while @Java :P |
|
|
| Report Abuse |
|
|
|
| 16 Sep 2013 06:51 PM |
| wops missed the vector thing qq |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 16 Sep 2013 06:51 PM |
if not round then for _,player in pairs(game.Players:GetPlayers()) do if player and player.Character then player.Character:MoveTo(Vector3.new(100,1,100)) player.TeamColor = game:GetService("Teams"):FindFirstChild("Lobby").TeamColor FIX* |
|
|
| Report Abuse |
|
|
are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
|
| 16 Sep 2013 07:08 PM |
crap I meant I wanted the team to change to either Red or Blue team by doing something like this
a = game:Service("Teams"):GetTeams() player.Team = a[math.random(#a)]
but I wouldn't want there to be a possibility somebody gets on the Lobby team. ^ |
|
|
| Report Abuse |
|
|
are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
| |
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 16 Sep 2013 07:14 PM |
a = {} for i,v in pairs(game:Service("Teams"):GetTeams()) do if v.Name ~= "Lobby" then table.insert(a,#a+1,v) end end player.Team = a[math.random(#a)] |
|
|
| Report Abuse |
|
|
SwaggyAf
|
  |
| Joined: 14 Sep 2013 |
| Total Posts: 6556 |
|
|
| 16 Sep 2013 07:17 PM |
| can i hold ur dominus on my main plz i wanna look kool |
|
|
| Report Abuse |
|
|
are31
|
  |
| Joined: 09 Nov 2007 |
| Total Posts: 13767 |
|
|
| 16 Sep 2013 07:28 PM |
@soquick, it didn't seem to work. look at this:
round = false if round == false then wait(5) for _,player in pairs(game.Players:GetPlayers()) do if player and player.Character then player.Character:MoveTo(Vector3.new(1,1,1)) -- teleporting doesn't work either a = {} for i,v in pairs(game:Service("Teams"):GetTeams()) do if v.Name ~= "Lobby" then table.insert(a,#a+1,v)--broken end end player.Team = a[math.random(#a)]-- broken end end end |
|
|
| Report Abuse |
|
|
Java3D
|
  |
| Joined: 29 Jul 2012 |
| Total Posts: 1229 |
|
|
| 16 Sep 2013 07:30 PM |
local teams = game:GetService("Teams"):GetTeams() for n,o in pairs(teams)do if(o.Name=="Lobby")then table.remove(teams,n)end end for n,o in pairs(game.Players:GetPlayers())do if(o.Character)then o.TeamColor = teams[math.random(1,#teams)] end end
~ 1Topcop |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
|
| 16 Sep 2013 07:41 PM |
| palyer.TeamColor = a[math.random(#a)].TeamColor |
|
|
| Report Abuse |
|
|
Java3D
|
  |
| Joined: 29 Jul 2012 |
| Total Posts: 1229 |
|
|
| 16 Sep 2013 07:41 PM |
derp. I forgot .TeamColor xP
~ 1Topcop |
|
|
| Report Abuse |
|
|
Soquick
|
  |
| Joined: 01 Nov 2012 |
| Total Posts: 1497 |
|
| |
|