How to change the vars of a colldied object

I have a bunch of objects in my scene, and I need to figure out how to decrement health based on the power of the projectile.

function OnTriggerEnter(col:Collider)
{
	if(col.gameObject.tag == "enemy" || col.gameObject.tag == "shield")
	{
		var Target:GameObject = GameObject.col;
		//col.SendMessage(hit); // This is how I used to do it.
		Target.GetComponent(Target).health -= damage;
		triggerBomb();
	}
}

The whole “var Target” blah blahblahblah stuff is my attempt to figure it out myself. Didn’t work.

Anyone have any ideas? The only other way to do this is to do a for-loop of the hit message for the amount of damage, but that’s a really hacky way and wrong way to do it.

Hello!
I think you can use this:

...
var target: GameObject = col.gameObject;
target.GetComponent.<Target>.health -= damage;
...

It may work if I understood your question correctly:)