I am currently working on a simple 2D tower defence type of game and today added a Main menu to the game by making a new main.collection with the menu, and switching to a game collection after a button press, using collection proxies and it works great. However, when I now switch to the game collection, my “hero” freezes while trying to update my mouse position. I am using my cursor to aim. I never altered the hero script at all while working on the main menu and has been working flawlessly until now. I am guessing it has a hard time with the new collection or something? See screenshot of the code. What do you smart people think is the problem? Do not hesitate to let me know if you need more information.
This is my error message:
“ERROR:SCRIPT: HelloLibrary/Scripts/Topdown/Hero.script:72: bad argument #1 to ‘__sub’ (vector3 expected, got nil)
[C]: in function ‘__sub’
HelloLibrary/Scripts/Topdown/Hero.script:72: in function <HelloLibrary/Scripts/Topdown/Hero.script:59>”
Also, I am using Editor 1.
Would love any ideas you might have