teleporting player after time runs out

I’m something of a noob scripter so if the answer is obvious have mercy on me…
I’ve been having trouble figuring out a way to teleport the player after a timer runs out.
I’ve been trying it with this countdown script since there are objects you can collect to increase the time in my game and this makes that relatively easy, i just cant seem to get it to teleport the player. heres what i have so far

var o_countdownTimer : countdownTimer;
var f_timerdone = timerDone;
var teleportTo : Transform;
o_countdownTimer = GetComponent(countdownTimer);
o_countdownTimer.setStartTime(10.0);
o_countdownTimer.setTimerDoneAction(f_timerdone);
o_countdownTimer.setTimerState(true);

function timerDone() {
    transform.position=teleportTo.position;  
}

in place of the first script on the link.

Thanks in advance! ^^

Mmm, maybe you have it but I dont see it, in the update you need to countdown a variable, varTime for example each frame and have a

var varTime = 100.0;

 if(varTime == 0)
    {
         transform.position = (0,0,0)
    }

Then you use a collision function to increment

function OnControllerColliderHit(hit:ControllerColliderHit){
    if(hit.gameObject.tag == "itemTag")
    {
         varTime+=100;
         Destroy(hit.gameObject);
    }
}

this function checks every frame if your player is colliding with the tagged item. You need to tag your item so that it matches what you write inside the brackets.
In case you don’t know about tagging, click on the object and on the top of the inspector there is a tag menu, click and choose a tag or edit new one.
Then if the if statement returns true, your varTime gets 100 more and the item is destroyed so that the player cannot just recharge endlessly.

Hope that helps.

Thanks both but it turned out the GUItext it was attached too was teleporting, heres my solution if anyone needs it in the future xD

var o_countdownTimer : countdownTimer;
var f_timerdone = timerDone;
var teleportTo : Transform;
var teleportee : UnityEngine.GameObject;
var vartime = 0;
o_countdownTimer = GetComponent(countdownTimer);
o_countdownTimer.setStartTime(vartime);
o_countdownTimer.setTimerDoneAction(f_timerdone);
o_countdownTimer.setTimerState(true);

function timerDone() {
    teleportee.transform.position=teleportTo.position;  	

    gameObject.active = false;
}