How do add animation from gdscript?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ranjithtv

I need to add animation for my sprite node, transformation. The position and scale factor for the animation is not pre known. It depends on where the sprite currently is and where I want to move it to.
How do I setup animation for this case? Any help in this regard is appreciated.

:bust_in_silhouette: Reply From: volzhs

You can do it with Tween class.
here is some example.