I managed to make the count time using delta.
Here is what i did:
var duration_pressed = 0
func _process(delta):
if Input.is_action_pressed("ui_left"):
duration_pressed += delta
#Resets the count
if Input.is_action_just_released("ui_left"):
_pressed()
print(duration_pressed)
func _pressed():
#Reset time when it becomes pressed
duration_pressed = 0
Now, how do I apply this so my player will not move with my grid, but just change the animation if the key press time is short?