How do I make my animated sprite play when I press auto play for my loading page's change scene timer

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

I have a loading scene with an animation which I want to play when the loading page appears, and then transition to the next scene. I found it is possible to transition to the next scene using the change scene timer, when it is on Auto play, but I cannot play my animated sprite, because it will get stuck and not transition. I also have a Animation play timer, which I also play on auto play.

my code is:

extends ColorRect

onready var godotSprite = $ComputerLoad
onready var tween = $Tween
onready var godotTXT = $Control/WordPig

func _ready():
tween.interpolate_property(godotTXT, ‘modulate’, Color(1,1,1,0), Color(1,1,1,1), 1, Tween.TRANS_BOUNCE, Tween.EASE_IN_OUT)
tween.start()

func _on_AnimationPlayTimer_timeout():
godotSprite.play()

func _on_ComputerLoad_animation_finished():
$ChangeSceneTimer.start()

func _on_ChangeSceneTimer_timeout():
get_tree().change_scene(“res://change_scenes/Level2.tscn”)