Are you connecting it properly?
To connect it, make sure you have a script attached to your root node in the scene. Then you click the button node in the scene view, then go to the Node tab (next to Inspector tab), and then you click pressed(), then connect at the very bottom. Then you just click connect on the popup and in the script attached to the root node you should see a function func onButton_pressed():. In that function put your code for what you want to happen when that button is pressed.