Why is this script not changing the players team?
Asked by
7 years ago Edited 7 years ago
2 | local Players = game.Players:GetPlayers() |
3 | local MonsterKing = Players [ math.random( 1 , #Players) ] |
4 | if MonsterKing.name = = not game.ServerStorage.LastMonsterKing.Value then |
5 | game.Players [ MonsterKing.name ] .Team = game.Teams [ "Monster King" ] |
6 | game.ServerStorage.LastMonsterKing.Value = MonsterKing.name |
I'm trying to make it so that my game will randomly choose a player to be the monster king while making it so they were not the monster king last time.