Script help- toggling buttons, etc.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ShaneGrey413
:warning: Old Version Published before Godot 3 was released.

Hey everyone I am trying to make it so that a toggle button will turn on and off the wings but it seems like the toggle button doesn’t update for some odd reason. Look at my script and my debug log. Can anyone tell me why?

SCRIPT:

func ready():
	set_fixed_process(true)
	hide()

func _on_Wings_pressed():
	show()
	update()
	print("is on")
	update()

func _on_Wings_released():
	hide()
	update()
	print("is off")
	update()

Debug Log after toggling the switch on and off a few times:

is on
is on
is on
is on
is on
is on
is on

Here’s a picture of the game and engine so you have a better idea of what I mean:
enter image description here

can’t tell much with given information.
need more script or connection info.

volzhs | 2017-05-08 06:55

:bust_in_silhouette: Reply From: RandomShaper

I think you need to connect to the toggled signal of the control instead.