Hi everyone,
i’ve written a simple script in javascript to make the character respawn when he falls after the edges of the floor.
However, Mono keeps saying that there is an error: BCE0005 Unknown identifier “If”.
This is the code:
function Update ()
{
If(transform.position.y<-100)
{
transform.position.y=8;
transform.position.x=75;
transform.position.z=12;
}
}
Where did i go wrong?