How can i rotate preloaded scene of AnimatedSprite2D?

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

So, I have a preloaded scene of my muzzle flash for a gun into a gun scene. and playing it through:

func create_muzzle_flash():
var flash_instance = flash.instantiate()
flash_instance.position = bullet_point.get_global_position()
flash_instance.rotation_degrees = bullet_point.rotation_degrees
await flash_instance.animation_changed

But it’s a) not rotating correctly and b) after animation finished it litters ground with the last frame of said animation and not deletes it.

What i’m talking about:

(please, someone, help, and % is spaces in browser btw.)
And yes, I need it as a scene, for PointLight2D from the muzzle flash.

:bust_in_silhouette: Reply From: Lucksinia

About rotation. I need to use rotation_degrees of something that actually rotates (Parent scene in my case).
About littering. I added at the preloaded scene like this and all worked at the end:

extends AnimatedSprite2D

func _ready():
await animation_finished