AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 11 Apr 2012 07:37 PM |
So I'm making a teams script, and I'm overpowering teams over teams.
function PlayerAddded(newPlayer) if newPlayer:IsInGroup(210099) then newPlayer.TeamColor="Bright blue" not new.Player.TeamColor="Black" if newPlayer:IsInGroup(560554) then new.Player.TeamColor="Black" end end)
newPlayer.TeamColor(newPlayer) -- Not sure about this line...
It seems to simple to work... |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 11 Apr 2012 07:41 PM |
You know it's not going to work so why ask if it's going to work?
game.Players.PlayerAdded:connect(function(plr) if plr:IsInGroup(210099) then plr.TeamColor=BrickColor.new("Bright blue") elseif plr:IsInGroup(560554) then plr.TeamColor=BrickColor.new("Black") else --Player not in a requested group plr.TeamColor=BrickColor.new("White") end) end) |
|
|
| Report Abuse |
|
|
L2000
|
  |
| Joined: 03 Apr 2008 |
| Total Posts: 77448 |
|
|
| 11 Apr 2012 07:41 PM |
newPlayer.TeamColor="Bright blue" not new.Player.TeamColor="Black"
I'm guessing you just want to set it to Bright blue? You need that inside BrickColor.new(), and you don't need the not with it.
if newPlayer:IsInGroup(560554) then
That only runs if the player is inside the first group. Is this what you wanted? If yes, then you need another end with it; otherwise, you'll want to use "elseif."
newPlayer.TeamColor(newPlayer) -- Not sure about this line...
That needs to run when a player is added, so you can use the game.Players.PlayerAdded event.
function PlayerAddded(newPlayer) if newPlayer:IsInGroup(210099) then newPlayer.TeamColor=BrickColor.new("Bright blue") elseif newPlayer:IsInGroup(560554) then new.Player.TeamColor=BrickColor.new("Black") end end -- The function isn't running inside the connect, so this bracket isn't needed.
game.Players.PlayerAdded:connect(PlayerAdded) |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 07:42 PM |
Game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer:IsInGroup(210099) then newPlayer.TeamColor = BrickColor.new("Bright blue") elseif newPlayer:IsInGroup(560554) then new.Player.TeamColor = BrickColor.new("Black") end end)
† KMXD † |
|
|
| Report Abuse |
|
|
|
| 11 Apr 2012 07:43 PM |
Of course I'm late...It was too easy.. Dx
† KMXD † |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 11 Apr 2012 08:03 PM |
For some reason, neither work.
The teams: -Tactical Corporation -Academy -Neutral -Raiders
Raiders = autoassignable |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 11 Apr 2012 08:13 PM |
ffaacceeppaallmm
I just realised, NOW,
that all I needed to do for the academy team is:
if not new.Player:IsInGroup(210099) then
fail |
|
|
| Report Abuse |
|
|