Godot Version
4.2
Problem
I cant get “if: Input.is_action_just_pressed()” to work
I get this error
Code
func fire():
if Input.is_action_just_pressed()
fire()
var Bullet_instance = Bullet.instantiate()
Bullet_instance.position = get_global_position()
Bullet_instance.rotation = rotation_degrees
Bullet_instance.apply_impulse(Vector2(),Vector2(bullet_speed, 0).rotated(rotation))
get_tree().get_root.call_deferred("add child", Bullet_instance)
await get_tree().create_timer(0.4).timeout
can_fire = true