public void ButtonClickBacktoBox() { if (menuOpened) { testCar.GetComponent <Rigidbody>().velocity = Vector3.zero; testCar.GetComponent <Rigidbody>().angularVelocity = Vector3.zero; if (timeKeeper != null) { timeKeeper.StopCurrentMeasurement(); } } }