Buttons
and TextureButtons
emit the pressed()
signal when they are pressed. For a brief overview of signals, see the documentation.
You want to link this signal to some change scene code so that when the button is pressed, the change scene code is executed.
To do this, click on your Button
node, then select the Node tab beside the Inspector tab. Then select the pressed()
signal. This will open a window to select which node you want to connect the signal to. Select whatever main node is running the main script of your scene.
For example,


Then you can write whatever change scene code you want to be executed.
For example,
get_tree().change_scene("res://path_to_scene.tscn")