The last part is adding to the script so that the object appears only when the screen is touched.
if(Input.touchCount > 0) { // then we can place our object if the screen has been touched. }