I copied a code from Brackeys that was supposed to wait before executing a function, but for some reason the Invoke function is not waiting. Both Debug.Log lines run right. public float restartDelay = 2.0f; public void EndGame() { if (gameHasEnded == false) { gameHasEnded = true; Debug.Log("GAME OVER"); Invoke("Restart", restartDelay); Debug.Log("This should be working"); } } Also this affects the lighting... Does the lighting problem affect the final game when I export it?