Sidescroller health bar collision script with regen?

I am at University in Leeds making a side scroller game for kids. Here is my health script i know it works but i need to make it take off health on a collision with my barrels in my scene. The barrels have a mesh colliders and the character has a character controller attached as well as other scripts for other things. My health bar is updated in the GUI when i test it but i can’t get the collision to work. Also how to regenerate the health once my re spawn script takes him back to the start. Many thanks for having a look at this!

var h00 : Texture2D;
var h25 : Texture2D;
var h50 : Texture2D;
var h75 : Texture2D;
var h100 : Texture2D;

static var HEALTH = 100;

function Update()
{
var g_Health = gameObject.Find(“g_Health”);

if(HEALTH > 75)
{
	g_Health.guiTexture.texture = h100;
	return;
}
else if (HEALTH > 50)
{
	g_Health.guiTexture.texture = h75;
	return;
}
else if (HEALTH > 25)
{
	g_Health.guiTexture.texture = h50;
	return;
}
else if (HEALTH > 10)
{
	g_Health.guiTexture.texture = h25;
	return;
}
else if (HEALTH <= 0)
{
	g_Health.guiTexture.texture = h00;
	return;
}

}

//what i did was draw the bar with
var maxHealth:float;
var health:float;
var healthRegen:float;
var pic:Texture2D;//fills the bar
var barRect:Rect=new Rect(0,0,.1,.5);//height and width are multuplyed be screen space
//remember not to leave things at 0
function OnGUI(){
GUI.Label(Rect(barRect.x,barRect.y,barRect.widthscreen.width,barRect.hieghtscreen.height),pic);//
}
function FixedUpdate(){
heath+=healthRegenTime.deltaTime;//makes health regenerate at healthRegen per-second :wink:
}, //what i did was draw the bar with
var maxHealth:float;
var health:float;
var healthRegen:float;
var pic:Texture2D;//fills the bar
var barRect:Rect=new Rect(0,0,.1,.5);//height and width are multuplyed be screen space
//remember not to leave things at 0
function OnGUI(){
GUI.Label(Rect(barRect.x,barRect.y,barRect.width
screen.width,barRect.hieghtscreen.height),pic);//
}
function FixedUpdate(){
heath+=healthRegen
Time.deltaTime;//makes health regenerate at healthRegen per-second :wink:
}