Im trying to get my character to respawn after reaching a certain y axis

So I’ve created this java script.

#pragma strict

function Start () {

}

function Update () {
	if (transform.position.y > -5); 
		transform.position = Vector3(-2.69, -0.479, -0.02); 
}

it doesn’t have any errors but after starting the game my character just floats and cant move. Its suppose to respawn the character after reaching the y axis of negative 5.

I suspect what you want is to reset the position if the player gets below -5.

Just change the > (greater than) to a < (less than).