Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone tell me what's wrong with this?

Asked by 10 years ago
team1 = game.Teams["Survivors"]
team2 = game.Teams["Zombies"]

Game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAdded:connect(function(Character) 
        Character.Humanoid.Died:connect(function() 
             Player.TeamColor = team2.TeamColor 
        end)
    end)
end)

0
"Game" is case sensitive, use "game". SlickPwner 534 — 10y
0
okay. zachhg03 35 — 10y

1 answer

Log in to vote
0
Answered by 10 years ago
team1 = Game.Teams["Survivors"]
team2 = Game.Teams["Zombies"]

Game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAdded:connect(function(Character) 
        Character.Humanoid.Died:connect(function() 
             Player.TeamColor = team2.TeamColor 
        end)
    end)
end)
Ad

Answer this question