- Home /
Question by
Niclzzx3 · Jul 20, 2015 at 09:55 AM ·
javascripterrortransformcharacter
Java Script Error since Unity 5?
var respawnHeight : float = 50;
function FixedUpdate() {
if (transform.position.z < -10) {
RestartLevel();
}
}
If my character falls off, it respawn. but Unity 5 says there is an Error in Sentence 1 that the ":" shouln'd be there.. help
Comment
Answer by BiG · Jul 20, 2015 at 09:56 AM
The only thing I can think about is to add "f" at the end
var respawnHeight : float = 50f;
To specify that's a float.
Your answer
![](https://koobas.hobune.stream/wayback/20220611232059im_/https://answers.unity.com/themes/thub/images/avi.jpg)