Hello
I would have a little question and would be happy if someone can help me and what could the error in my script be, thank you
Welcome to the forums! If you’re getting an error in the console, it’s much more helpful for us if you copy and paste that here for us. You can use the little button in the text editor (pictured below) to insert code instead of screenshotting it, and paste the error exactly as it appears.
That said, from a glance it looks like on line 26 (and 31) you’re using the operator +-
, which is not a valid operator. I’m guessing you meant +=
instead.
It also looks like you maybe have an extra closing curly brace on line 46.
Keep plugging away at it. This stuff will all make more sense in time.
Hello
I would have a little question and would be happy if someone can help me and what could the error in my script be, because when I go back to Unity nothing shows up under PlayerScript.
1st, you should start your own post, as this does not have anything to do with the original post. 2nd, when you post code, do not use a screen shot as we cannot see all of the code, use code tags. Its on the toolbar when you are posting a new message, it says “code:”
Okay thank you, will do.