weird button activity and a variable stuck at 1

Godot Version

4.1.1

Question

i have a variable in a game that essentially is supposed to switch when a texture button is pressed to show and hide different sprites and i have 3 buttons which change the value to 1,2, and 3 respectively and they’re written as “if TheButton.pressed:
variable = x”
but for some reason the variable is always stuck at one, and if i deleted the first buttons code it gets stuck at 2 etc even though i have onready for it to be set to 55 just to test it (i also have a debug text up showing the current value of the variable) and the buttons themselves dont do anything to change it and then i thought maybe i needed to put parenthesis after “.pressed” but then it said the function was nonexistent and then i tried different button settings and nothing worked and now i have no idea what to do. (i would attach a video but i just made my account for this so i cant)

You can look in the node tab and it will show a signal for button pressed. Then choose connect, and it will write a function in the script you choose. That’s what I do.

is that checkbox supposed to never be checked or pop up any options or am i stupid

update i think the button_down and pressed are being weird and acting like they’re always active so I’m just gonna do a workaround by making the buttons have their own scripts but I’m still curious why this is happening