IEnumerator EndCoroutine() { while (gearEngine.GetCurrentSpeed() > 2f) { yield return(null); } while (yDistance - 2f > .3f) { if (yDistance > 2f) { yDistance = Mathf.Lerp(yDistance, 2f, Time.deltaTime); } if (xDistance > -2f) { xDistance = Mathf.Lerp(xDistance, -2f, Time.deltaTime); } yield return(null); } carAudio.PlayOneShot(1); }