Respawn Point respawning far away

I am working on a marble raceway game where the player can roll around and if his life gets to zero, he respawns. the respawn script basicly sends the spawner gameobject to the latest collision between the player and a respawn point, so when the player dies, the last respawn point that he hit is the one that he starts at. but when I test it, the player respaws roughly 90 units away from the spawn point. My respawn Manager code looks like this :

var marbleLocomosion : Transform;

var marbleHealth : MarbleScript;
var marbleCameraTransform : SmoothFollow;

function Awake()
{

}
function Respawn() 
{
    var clone : Transform;
    Destroy(marbleLocomosion);
    clone = Instantiate(marbleLocomosion, transform.position, transform.rotation);
    marbleLocomosion.position = transform.position;
    marbleHealth.health = 100;
    marbleCameraTransform.target = marbleLocomosion;
}

and my respawn point script looks like this:

var CurrentPosition : Vector3;

var Manager : Transform;

var particleAnimator : ParticleAnimator;

private var manager : RespawnManager;

var isActive : boolean = false;

function Awake()
{
    manager = FindObjectOfType(RespawnManager);
}
function Update () 
{
    CurrentPosition.x = transform.position.x;
    CurrentPosition.y = transform.position.y;
    CurrentPosition.z = transform.position.z;
    if(Manager.transform.position == CurrentPosition)
    {
        isActive = true;
    } else {
        isActive = false;
    }
    if(isActive == true)
    {
        particleAnimator.doesAnimateColor = true;
    }
    if(isActive == false)
    {
        particleAnimator.doesAnimateColor = false;
    }
}
function OnTriggerEnter()
{
    Manager.transform.position.x = CurrentPosition.x;
    Manager.transform.position.y = CurrentPosition.y;
    Manager.transform.position.z = CurrentPosition.z;
}

Like Jason B, I see nothing wrong with your code, other than the fact that it is really verbose! Here's the exact same thing without a bazillion lines!!! :-O

var marbleLocomosion : Transform;
var marbleHealth : MarbleScript;
var marbleCameraTransform : SmoothFollow;

function Respawn() {
    Destroy(marbleLocomosion);
    marbleLocomosion = Instantiate(marbleLocomosion, transform.position, transform.rotation) as Transform;
    marbleHealth.health = 100;
    marbleCameraTransform.target = marbleLocomosion;
}

.

var particleAnimator : ParticleAnimator;

private var managerTransform : Transform;

function Awake() {
    managerTransform = (FindObjectOfType(RespawnManager) as Component).transform;
}

function Update () {
    particleAnimator.doesAnimateColor = managerTransform.position == transform.position;
 }

function OnTriggerEnter () {
    managerTransform.position = transform.position;
}

Don't name something ...Script, though. It's a script, we know that. Marble, not MarbleScript. That whole variable is bad practice. This is better:

var marble : Marble;

Have you tried testing multiple respawn points? Do you always respawn at the same relative offset?

I don't see anything in your code that's telling your spawn points to have any sort of offset. So that leads me to believe your spawn points may be parented to something. Are they?

If so, your spawn points are using their own local coordinates and not world coordinates to display their location. For instance, for a child object, 0, 0, 0 isn't the center of the world, it's the center of whatever it's parented to. So getting its position will return 0, 0, 0, and then sending you there will instead be like sending you back to the center of the scene rather than to the spawn point since your character is (assuming) not parented to anything so moving its position will move it in world coordinates.

Anyways, I'll try not to blather too much on this point if this isn't even what the issue is. :)

But if your respawn points are parented to anything, one (of a few) solutions could be to child your character to the respawn point parent, then set its position, then unparent it (a quick and dirty fix, but a fix nonetheless!).