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

Team change script puts me into Neutral?

Asked by
zomspi 541 Moderation Voter
4 years ago
Edited 4 years ago

My team change script doesn't work?

game.Players.PlayerAdded:Connect(function(plr)
    local leaderstatsA = plr:WaitForChild("leaderstatsA")
    if leaderstatsA:WaitForChild("Customer").Value == true and leaderstatsA:WaitForChild("Manager").Value == false
     then

        plr.TeamColor = game.Teams["Customer"].TeamColor
        plr:LoadCharacter()
    end
    if leaderstatsA:WaitForChild("Manager").Value == true and leaderstatsA:WaitForChild("Customer").Value == false
        then
        plr.TeamColor = game.Teams["Manager"].TeamColor
        plr:LoadCharacter()
        end

end)




Answer this question