IEnumerator ani() { replayAni.SetActive(true); //play animation mouse.SetBuffer(); //set player cant control yield return(new WaitForSeconds(2.0f)); afterAni(); }