C# Some coding issues with trying to enable powerup

Basically after i instantiate the object I do the below, but i'm not getting the right behavior or doesn't seem that the powerup gets turn on in the target.

        GameObject go = (GameObject)GameObject.Instantiate(Resources.Load("Target"), spawnPoints[num].transform.position, Quaternion.identity);
    TargetPowerUp test = go.GetComponent<TargetPowerUp>();
    test.enableStarPowerUp();

using UnityEngine;

using System.Collections;

public class TargetPowerUp : MonoBehaviour { public bool starPowerUp; public float starPowerUpDuration;

// Use this for initialization
void Start () {

    // Needs to know once started if it's powerup is on or off . Can't initiaize based on click cause he's gone dead
    // Check with teh GameSystem

    starPowerUp = false;
    starPowerUpDuration = 10.0f;

}

// Update is called once per frame
void Update()
{
    // Check tosee if we have star power up
    if (starPowerUp)
        starPowerUpDuration -= Time.deltaTime;

    // Star powerup depleted
    if (starPowerUpDuration < 0)
    {
        starPowerUpDuration = 0;
        disableStarPowerUp();
    }
}
void OnMouseOver()
{
    if ( starPowerUp )
    {
        GetComponent<TargetBase>().KillObject();
    }
}

public void enableStarPowerUp()
{
    starPowerUp = true;
}

public void disableStarPowerUp()
{
    starPowerUp = false;
}

}

You probably need to be more specific, have you tried using the mono-debugger (or simple print() debugging) ? Seems that the powerup has to be used within 10s. You could just remove the powerup again, once it is inactive by using Destroy(this); With the current solution you can have multiple powerups of the same type attached, and might get one that is inactive. Ah, I see now, you probably need to refill the powerup in Enable...() Duration = 10, or it can only be used once anyhow. Or use OnEnabled() instead of Start() Cheers, /Thomas