Last active
July 13, 2020 09:59
-
-
Save Core-commits/35b9632a43c9e415308b86cf075be42c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Game.assingRandomTeam = true; | |
Team1Spawn = world.spawns.find(spawn => spawn.name === "Team1") | |
Team2Spawn = world.spawns.find(spawn => spawn.name==="Team2") | |
Team1 = "Team 1 name here"; | |
Team2 = "Team 2 name here"; | |
Game.on("playerJoin", (player) => { | |
if (player.team.name == Team1){ | |
player.spawnPosition = Team1Spawn.position; | |
} | |
else if (player.team.name==Team2){ | |
player.spawnPosition= Team2Spawn.position; | |
} | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment