dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Feb 2012 08:44 PM |
I have a table called GPlayers. It's an empty table. I get the players like this:
for i,v in pairs(game.Players:GetPlayers()) do table.insert(GPlayers,v.Name) end
Then i have this in the script:
game.Players.ChildAdded:connect(function(Player) Player.CharacterRemoving:connect(function(Char) for i = 1,#GPlayers do if Player.Name == GPlayers[i] then table.remove(GPlayers,i) game.Players[GPlayers[i]].TeamColor = BrickColor.new("White") print("UMADBRO?") end end end) end)
The print("UMADBRO") wont go in the output when i reset. I don't know why it's not working. |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2012 08:45 PM |
This is all the same script, right?
`*\~-{ Are we there yet T.T? }-~/*` |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Feb 2012 08:47 PM |
| Yes. I have much more, the players get split into 2 teams and when they die, they need to go back to the spectating team. Which is the color "White". |
|
|
| Report Abuse |
|
|
|
| 23 Feb 2012 09:07 PM |
if Player.Name == GPlayers[i] then
theres your problem.
It needs to be GPlayers[i].Name
`*\~-{ Are we there yet T.T? }-~/*` |
|
|
| Report Abuse |
|
|
dirk29
|
  |
| Joined: 26 May 2010 |
| Total Posts: 1142 |
|
|
| 23 Feb 2012 09:41 PM |
I don't think it does.
table.insert(GPlayers,v.Name)
In the table is the player's name. |
|
|
| Report Abuse |
|
|