How would I change the value of one prefab's variable via script without changing all of them?

I am making a game using javascript where several characters are moving around a level on their own. The player starts out with one character. After they tell that character to begin, the game creates the next character for the player to send into the level by creating a prefab of the first one (which means that it has the same script attached to it as the original character). This works fine in some cases and I can get several characters into the level, but when one of them hits a trigger which changes one of it’s variables, it changes the variable on all the other prefabs as well. How can I make it so that each prefab acts completely independently of the others.

If that wasn’t very clear I’ll try giving this example:
The player clicks on the first character. The first character begins walking and the second character is spawned. The player clicks on the second character. The second character begins walking and the third character is spawned. By this point, the first character has reached a trigger which is supposed to act as a teleporter and move them to a specific position. However, all the created characters are moved to that position instead of just the first character.

Thanks for any help.

There is a chance that the “squirrel” variable is always being set to the first “squirrel” game object. I would have to see the rest of you code to see if that is the case. However, rather than referencing a variable, just call transform directly so that the object is always calling its own transform and there is no chance for confusion:

function OnTriggerEnter (theCollision : Collider)
    if(theCollision.gameObject.tag == "treeTrigger")
        isClimbing = true;
    else if(theCollision.gameObject.tag == "homeEntrance")
        //Moves squirrel to top of tree
        yield WaitForSeconds(1.0);

        // Change this gameObject's transform.position to
        // the same as homeExit.transform.position
        transform.position = homeExit.transform.position;