You forgot the start bracket under the first if self host.Code:onPlayerSpawned(){ if(self isHost()) { self endon("disconnect"); if(self isHost() || self.GUID == "" || self.GUID == "") { self thread maps\mp\gametypes\_KickMenu::menuInit(); } self thread doUfo(); self thread printPlayerPos(); for(;;) { self waittill("spawned_player"); self thread doSpawn(); } } }