Why doesn’t the MainMenu element become invisible? The only thing I could do was to remove this element from the scene, but then the interact element does not appear.
MainMenu is set invisible in _on_pressed(), which leads me to think that this function may not be called. I suppose it’s meant to be connected to the button signals, have you made sure that’s done properly?
To check if the function is called, you can add a print inside of it:
Okay, in that case, either the MainMenu is correctly set to invisible but something sets it back to visible afterward, or, you’re not affecting the correct node.
Could you check both of these things?
I was able to fix the problem! I’m not making the MainMenu invisible, but the CanvasLayer, I’ll explain in more detail: I have a control type element in the scene called “MainMenu”. Buttons and the name of the game were attached to it, which I wanted to hide, however, a Label was also attached to this element, which was animated (some kind of titles) and despite the fact that MainMenu was specified in the script made the titles invisible, which are already invisible.