cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 26 Nov 2015 10:13 PM |
local player = game.Players.LocalPlayer local char = player.Character or player.CharacterAdded:wait() local hum = char:WaitForChild'Humanoid' local team1 = game.Teams.Red local team2 = game.Teams.Blue debounce = false
hum.Died:connect(function() if debounce == false then debounce = true if _G.GameMode == 'Elimination' then player.TeamColor = BrickColor.new('White') elseif _G.GameMode == 'Team Swap'then print'team swapppp' if player.TeamColor.Name == team1.Name then print'switching teams' player.TeamColor = BrickColor.new(team2.Name) elseif player.TeamColor.Name == team2.Name then print'switching teams' player.TeamColor = BrickColor.new(team1.Name) end end end end)
Output: team swapppp
Doesn't change teams? |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
| |
|
|
| 26 Nov 2015 10:29 PM |
| Should I say that after or before the print you haven't even set the new team? Lol. |
|
|
| Report Abuse |
|
|
cgjnm
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 27 Nov 2015 03:05 PM |
| It prints 'team swapppp' if the guy died and the gamemode is 'Team Swap' then is prints the 'switching teams' under the two if statements |
|
|
| Report Abuse |
|
|