player not accelerating using lerp

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

I was watching BornCG’s 2D platformer tutorial, where he added running to the game. But when i used his code, my player wasn’t accelerating. My walk and run speed suddenly became so slow even though i didn’t change them

if Input.is_action_pressed("right"):
			if Input.is_action_pressed("run"):
				velocity.x = lerp(velocity.x,RUNSPEED,0.1)
			else:
				velocity.x = lerp(velocity.x,SPEED,0.1)
			$Sprite.play("Walk")
			$Sprite.flip_h = false