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.