The modified project I'm attaching seems to work. I used Godot 4.7.2-stable.
I made various changes to Movement.gd. You can determine what was changed by comparing the old and new files. If you have specific questions about the changes, ask them.
Changes to Movement.gd in patch format (< line in new file, > line in old file):
diff -r new_Movement.gd old_Movement.gd
0a2
> @onready var timer: Timer = $Timer
4,9c5,10
< const DASH_SPEED_DELTA: float = 300.0
< const DEFAULT_SPEED: float = 30.0
< const JUMP_VELOCITY: float = -400.0
< const DOUBLETAP_DELAY: float = 0.25
< var doubletap_time: float = DOUBLETAP_DELAY
< var last_keycode: Key = Key.KEY_NONE
---
> const DASH_SPEED_DELTA: float = 10000
> const DEFAULT_SPEED: float = 300
> const JUMP_VELOCITY = -400.0
> const DOUBLETAP_DELAY = .25
> var doubletap_time = DOUBLETAP_DELAY
> var last_keycode = 0
14,35d14
< # Displays current speed.
< @onready var speed_label: Label = $Speed
<
< # Indicates whether a dash is active.
< @onready var dash_label: Label = $Dash
<
<
< func _ready() -> void:
< dash_timer.one_shot = true
< dash_timer.autostart = false
< dash_timer.timeout.connect(func(): speed = DEFAULT_SPEED; dash_label.hide())
< add_child(dash_timer)
<
< speed_label.position = Vector2(50.0, -100.0)
< speed_label.text = "0"
< speed_label.show()
<
< dash_label.position = Vector2(-50.0, -100.0)
< dash_label.text = "DASH"
< dash_label.hide()
<
<
37,38d15
< doubletap_time -= delta
<
39a17
> doubletap_time -= delta
42c20
<
---
> Time.get_ticks_msec()
50d27
<
53,54c30,32
< velocity.x = lerp(velocity.x, direction * speed, 0.05)
<
---
> velocity.x = lerp(velocity.x, direction * DEFAULT_SPEED, 0.05)
> print(velocity.x)
>
58d35
<
60,61d36
<
<
63c38
< func _input(event: InputEvent) -> void:
---
> func _input(event):
65,67c40,42
< if last_keycode == event.keycode and doubletap_time >= 0.0:
< print_debug("DOUBLETAP: ", event.keycode)
< last_keycode = Key.KEY_NONE
---
> if last_keycode == event.keycode and doubletap_time >= 0:
> print("DOUBLETAP: ", String.chr(event.keycode))
> last_keycode = 0
72d46
< dash_label.show()
76,79c50,55
<
<
< func _process(_delta: float) -> void:
< speed_label.text = "%.0f" % velocity.length()
---
> func _ready():
> dash_timer.one_shot = true
> dash_timer.autostart = false
> dash_timer.timeout.connect(func(): speed = DEFAULT_SPEED)
> add_child(dash_timer)
I also defined the left and right arrow keys in Project Settings / Input Map, because I prefer those keys to the "A" and "D" keys. I also added a couple of labels for diagnostics.