how to prevent sound from cutting off in the end of animation in animationplayer

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

so i need to play a sound on the end of animation but it gets cuts off. Is there a way to prevent this from happening?

:bust_in_silhouette: Reply From: godot_dev_

You could connect a sound-playing function to your AnimationPlayers’s animation_finished signal, so that every time the animation player finished an animation, you have full control on what sound is played.

I suspect why your sound is cutting off is because the sound playing logic may be controlled by your AnimationPlayer.

:bust_in_silhouette: Reply From: stormreaver

There are multiple possible reasons your sound is getting cutoff. When it happens to me, it has always been because I’m sharing the audio player with more than one sound effect. Using a different audio player for each sound effect fixes the problem for me.