How do i make buttons work?

Godot Version

4.2.1

Question

hy guys! So i have a problem. i made a level up screen for my rougelike game. I made it so when i level up that panel gets to the players position using tweens. Now i need to make it dissapear using buttons. I tried to do it but it doesnt work. Down below are all the screenshots with context, can anyone help?? Also forgot to mention that the buttons use is when anyone selects a choice they click a button.

Button script with tree for it:

Script for tweens and a place for the remove level up menu:

level up menu tree with the script for it:

Since buttons emit a signal pressed(), you can have a node subscribe to that pressed() signal in order to call a function or perform some behaviour. (Usually, a parent or sibling in the hierarchy would subscribe to the button’s pressed() signal).

Since you use a Tween and tween_property to tween the level_panel’s position to on-screen, you could store in a separate variable the starting position of the level_panel, and use a Tween to interpolate the position of the level_panel back to it’s starting_position.

Essentially, you’re doing the same but opposite - instead of moving it to (0, 0), you’d be moving it to its starting_position, stored in a variable.

Hope that helps point in the right direction.

Regards,