How to reset the light component?

Hi guys,

I’m new in unity and scripting and I need your help for my project.

I have a Point light attached to my player and I added a script to it, for decrease the Light Range through time. here my script:

var lerpTime : float; 
var maxRange : float;  // I put it to 10 in game
private var i : float = 0; 
var GameScene : String;

function Update () 
{
light.range = Mathf.Lerp(maxRange,0, i/lerpTime);  
 i+= Time.deltaTime;
 if(light.range <= 1) //  GameOver scene
{
	Application.LoadLevel(GameScene);  
}
}

Also the player needs to find something to increase the Range and I attached it to my Player:

function OnTriggerEnter (objetInfo:Collider) 
{
if(objetInfo.gameObject.tag == "Power")  // Name of the tag of object
{
Destroy(objetInfo.gameObject);
}
}

And in the end, I attached to the same Point light, the script bellow to reset the Range of my light:

function OnTriggerEnter (objetInfo:Collider)
 {
if(objetInfo.gameObject.tag == "Power")
 {
light.range = 10;
}
}

VOILA
When I play, Light range decrease through time but it never reset when I pick the object …

any help will be wonderful

Can you explain it a bit more, you have two OnTriggerEnter’s, are they on the same GameObject? If so, then why? Maybe you are destroying it before you reset it.

I have the same Trigger for one object.
Think that I want to pick an object and charge my Flashlight!
The middle one is attached to my player and the two others to my light. This light is attached to my Player as well.
Do you have a solution in this case?