Boolean not working as expected

As I said before, you have to include the scene name in quotes.

Not main (because the browser thinks this is a variable

‘main’ or “main” is the correct way.

EDIT - Check out the post by Mark here that will help you when deciphering errors. Tip always check your console when your project doesn’t run as expected.