Ok, so the way I solved this problem was by using
to change the state of a variable "is_attacking".
This is placed within the main input "if" statement as an elif. I then have another elif check if "is_attacking" is true, and if it is, play the attack animation.
I then connect a signal for AnimationFinished from the AnimatedSprite to the Character's Script, and inside the function that's made, ensure that "isattacking" is made false.
So, back in my physicsprocess, "isattacking" will be true for one full animation cycle of the attack animation, and the animation stops after that.
Here's the code that I used. Declare a var is_attacking outside of the process :
attacking = true
Hope this helps!