public void StartNewChicken() { if (currentRun.chickensleft < 1) { UI.SetForFinal(); return; } currentRun.chickensleft--; tries++; if (currentChicken != null) { Destroy(currentChicken.gameObject); } Grill.GoToGrill(); status = GameStates.cooking; UI.SetForCooking(); //restart the grill sliderGrill.value = 10f; GameObject foo = (GameObject)Instantiate(chickenPrefab); currentChicken = foo.GetComponent <chicken>(); }