please help

i am trying to make a script that deletes the object its attached to when your player touches it but it does nothing here’s my script

*var delslf = false;

var target : Transform;

function OnControllerColliderHit(hit : ControllerColliderHit)

{

if(hit.gameObject.tag == "Player")

{

	delslf = true;

}

}

function update ()

{

if (delslf);

	Destroy(target);

}*

please help

Well, it probably has something to do with OnControllerColliderHit, and the way your colliders are setup .

Set your collider as trigger, and use OnTriggerEnter