Simple Collisions

Hallo 3 days now i break my head how to do this simple thing …
When A touches B i want C to change its width (javascript)
And here is my script for C ( it is a GUI Texture…)

var HealthPoints : int = 100;

function Update () {

guiTexture.pixelInset.width = HealthPoints;

    if (HealthPoints <= 0)
    HealthPoints += 100;
}

[3349-χωρίς+τίτλο.png|3349]

I managed to answer this by my self and with this i just became more experienced :smiley: