Hello, i have made a crouch and sprint for my 3D game but when i try to sprint it doesn't work, it only works to crouch. Here's the code
if Input.is_action_pressed("shift"):
speed = sprint
else:
speed = 5
if Input.is_action_pressed("ctrl"):
speed = crouch
$Head.translation = Vector3(0,1.5,0)
else:
speed = 5
$Head.translation = Vector3(0,2.5,0)