Destroy a object from Hierachy

Hello Everybody,

I have a little question. I created a prefab with gui click event. How can i destroy this object from Hierachy when a new prefab created?

var deleteobject : GameObject; function Start (){ Destroy(deleteobject); }

I can't delete this object with this code?

Regards.

Problem Solved!