|
| 17 Mar 2012 05:19 PM |
function: Killed() local c=game.Players:GetChildren() for i=1,#c do if c[i].TeamColor == game.Teams.Red.TeamColor then c[i].TeamColor = game.Teams.Blue.TeamColor elseif c[i].TeamColor == game.Teams.Blue.TeamColor then c[i].TeamColor = game.Teams.Red.TeamColor end end end
Killed()
Basicly if a player on Red kills a player on Blue then a random person from the team Blue Jail will change team and be on team red again. |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2012 05:27 PM |
function Killed() -- Don't put a : local c = game.Players:GetChildren() for i=1,#c do if c[i].TeamColor == game.Teams.Red.TeamColor then c[i].TeamColor = game.Teams.Blue.TeamColor elseif c[i].TeamColor == game.Teams.Blue.TeamColor then c[i].TeamColor = game.Teams.Red.TeamColor end end end
Killed() |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2012 05:31 PM |
| Ty. And can you change it so when a player on Red kills a Player on Blue a random player on Blue Jail goes back to team Red? |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2012 05:35 PM |
| Sorry, I don't know how.. xP |
|
|
| Report Abuse |
|
|
|
| 17 Mar 2012 05:39 PM |
I found something on a forum post. So, I'll try.
|
|
|
| Report Abuse |
|
|
|
| 17 Mar 2012 05:40 PM |
local p = Game.Players:GetPlayers() local rp = p[math.random(#p) --put event here
I'll let you do it >:D |
|
|
| Report Abuse |
|
|