Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can someone tell me what's wrong with this?

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)

2 comments

0

"Game" is case sensitive, use "game".

0

okay.

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.