0 votes

I have a start menu, in start menu, the button "Start game" open the game to play.
button start game code:

gettree().changescene("res://scenes/main.tscn") # main.tscn is the game

when the player reach game over, the game return to start menu.
game over code:

gettree().changescene("res://scenes/inicio.tscn") # inicio.tscn is the start menu

but after the first game over, the buttons on start menu do not work anymore.

in Engine by (20 points)

can you give us more details?

Can you elaborate more on your question? It seems like something else might be involved that might be interfering with the program.

I have 2 scenes that work like the menu and the game.
when I'm on the menu, when I click the "new game" button I execute the method


to open the game.
When the game is over, I execute the method


to go back to the menu.
After returning to the menu, the "new game" button no longer works, does not open the game. And i don't know what i am doing wrong. I read about this method "changescene" and i found some people saying: it's just call changescene(), and the method does the rest.

Sorry for the stupidity, I solved the problem. The game was being paused when I went back to the other screen

It's great that you solved your problem! And it's not about your stupidity. That's the way how human beings learn, through mistakes.

yeah, you're right, thank you for your time. I will continue exploring this incredible engine!

Wish you luck on your journey ahead!

Same issue for me and same solution also.
I ran in exactly the same fault: changing to the main menu while paused.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.