Instantiate and destroy on given location

I want to have an object wich destroys on the click of a button and then instantiate an object on that same location. But the object is moving so i don't know how i should do this exactly. if it's possible to get the coordinates from a empty gameobject and instantiate it as a child of that gameobject then that would be great. Anyone who can help with this?

Attach the object that you want to be instantiated on the other objects destroy into the prefab slot. And attach this script (possibly) to the obejct that you do not want destroyed. Or if this is way off let me know.

public class DestroyOnMouseDown : MonoBehaviour {

    public GameObject prefab;

    private void DestroyOnClick(GameObject InstOnDestroy) {
      if (OnMouseDown()) { Destroy(transform.gameObject); }

      GameObject instPrefab = (GameObject) Instantiate(InstOnDestroy, prefab.transform.position, prefab.transform.rotation);

      Destroy(instPrefab, 2.2f);

    private void Update() {
        if (prefab) DestroyOnClick(prefab); 

        //else: puporseless script

Or if this is way off let me know.