Destroy(this.gameobject) doesn't work

This does not work:

function Death()
{
	if (eaten < 1)
	{
		Destroy(this.GameObject);
	}
}

Neither does this:

var clone : GameObject = this.GameObject;

function Death()
{
	if (eaten < 1)
	{
		Destroy(clone);
	}
}

These are clones created from a spawn function as follows:

   function Spawn() 
   {
   			if (Spawned < MaxSpawn )
   			{
       			Instantiate(SpawnObject, Vector3(transform.position.x, transform.position.y -6, transform.position.z), transform.rotation); 
       			Spawned ++;
       		}
   }

What do I need to do to get this thing to starve to death??? :stuck_out_tongue: I can clearly see that eaten = 0 in debug.

Do you have this called from update?

Try the following

function Update(){
    if (eaten < 1) {
            Destroy(gameObject);
    }
}

This function needs to be in a MonoBehaviour attached to your SpawnObject

Edit: Just noticed you are using a capital G for this.gameObject. That will sort things for you

You can just use, just add a collider to and your player and tick the is trigger box on death object:)

using UnityEngine;
using System.Collections;

public class Die : MonoBehaviour
{

	void OnTriggerEnter(Collider other)
	{
	Destroy (other.gameObject);
	}

}