Okay, this should be relatively easy but I'm running into errors. My main character is visible in the beginning of the game (where the main menu is) and because I coded it so that all of the enemies don't spawn unless the main character is visible, the enemies spawn too. As a result, if you stay at the main menu for long enough, the score continues to go up, the health goes down when enemies attack, etc.
Where should I put the code and what should it be to make the main character not visible starting from the beginning of the game?
You're the only one that can really answer that, so try setting it to be invisible as one of the first lines of code in the timeline. If you get errors, include them in your posting.