if Input.is_action_just_pressed("jump") and is_on_floor():
jump_timer += delta
current_speed = crouchspeed
elif Input.is_action_just_released("jump") and is_on_floor():
animation_player.play("headbob when jumping")
if jump_timer >= 1:
velocity.y = jump_velocity
elif jump_timer <= 1:
velocity.y = wall_jump_velocity
this is my new script and here i was trying have to player jump higher when the key is held for more than a second, i tried doing this with a timer but it seems like i dont know how to make one.