public void MakeTombstone() { Scorekeeper score = gameObject.GetComponent <Scorekeeper> (); if (score.CanBuy(tombstonePrice)) { score.AddScore(-tombstonePrice); Instantiate(tombstone); } else { Debug.Log("Not enough money for a tombstone."); } }