Godot loads in the wrong scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Entity2020 studios

So I set up a loading screen for a game I’m making, and it uses a global variable to figure out what level to take the user to. But I’ve done it in the same way as I have in my previous projects, and yet it doesn’t do it correctly.

What’s supposed to happen is that you click ‘play’ and then it takes you to a loading screen, which then takes you to the level selection screen.
What happens instead is that the loading screen appears, and the music keeps playing for some reason, and then it goes back to the menu screen.

I’ve checked the code and nothing is wrong with it, and yet it does the wrong thing.

It’s driving me insane. I’ll do anything to make it go away. I just want it to work.

If you seriously need to know exactly what it is, then I will show you the code as proof that I programmed it correctly. I’ve done everything in the exact same way that I did with my previous game, which worked fine. If it helps, then I used an animation player to make an intro, which is on the same scene as the main menu. But I’ve tried everything, and now it won’t even load a scene when it’s done loading.

Entity2020 studios | 2023-03-20 17:31

I’ve checked the code and nothing is wrong with it, and yet it does the wrong thing.

Really, I doubt this is the case. Though, as suggested above, for more specific help you’ll need to post the code in question and continue to answer clarifying questions if they’re asked.

jgodfrey | 2023-03-20 19:17

I agree with @Jgodfrey

godot_dev_ | 2023-03-20 19:36

:bust_in_silhouette: Reply From: Entity2020 studios

I fixed it. Turns out I was supposed to autoload the GD file and not the tcsn. The reason I was loading the tcsn file was because it wouldn’t work before. But with that broken intro screen gone, it now works fine.