|
Hello! I am trying to write a script where the player (in this case just a sphere) respawns (as in, goes back to it's original position) when it falls off-world. I wrote the following script: When trying to execute it, I get the following error: Assets/Die.js(5,1): BCE0034: Expressions in statements must only be executed for their side-effects. What is going wrong?
(comments are locked)
|
|
Try with: You have substituted an "=" with a ":", and this won't change the position. Also, you've ended the if statement with a ";". It should work now.
(comments are locked)
|
|
Thank you! I ended up using Which works great as a very basic respawn system. The biggest problem was indeed ending the if-statement with a semicolumn. This caused the script to not actually execute what was defined in the function.
(comments are locked)
|
