Tween not animating

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

Hi again! I created my first tween and it’s not animating at all. :frowning:
I have a texture button inside a CanvasLayer who is a direct child of my Root node, that I’m trying to animate it’s opacity when I press it.

Here’s my setup:

func _ready():
	set_fixed_process(true)
	
	start_button = get_node("CanvasLayer/StartButton")
	effect = get_node("Effect")

func _on_TextureButton_pressed():
	effect.interpolate_property(start_button, 'visibility/opacity', 
		1, 0, 0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)

When I press the button nothing happens. It remains with its opacity at 1. Any help?

Have a nice day!

:bust_in_silhouette: Reply From: Skyfrit

You need to start the tween node.

effect.interpolate_property(start_button, 'visibility/opacity', 1, 0, 0.3, Tween.TRANS_QUAD, Tween.EASE_OUT)
effect.start()

lol. Thanks! :wink:

AlighaThor | 2017-12-14 16:53

You’re welcome.

Skyfrit | 2017-12-14 17:42