Thanks so much for the answer, but this wasn't the solution. But I did notice that under the code that made the player walk I added script which said:
if Input.is_action_pressed("walk_right"):
$PlayerSprite.play("Run2")
velocity.x += speed
**if Input.is_action_just_pressed("jump"):
velocity.y = jump_speed
$PlayerSprite.play("Jump")**
and
elif Input.is_action_pressed("walk_left"):
$PlayerSprite.play("Run")
velocity.x -= speed
**if Input.is_action_just_pressed("jump"):
velocity.y = jump_speed
$PlayerSprite.play("Jump")**
all I needed to do was to delete the extra jump commands and it stopped. (The ** is to show which part I am talking about).