CharacterBody2D knockback not being applied in the correct direction

Passing the velocity of the projectile as the source position argument of your knockback function doesn’t seem right. Either way, you can probably simplify your code like this:

@export var knockback_force: float

func _on_area_entered(area: Area2D) -> void:
	area.get_parent().take_damage(damage_amount)
	area.get_parent().knockback(get_velocity().normalized() * knockback_force)
	queue_free() 

By letting the projectile calculate the knockback itself, it can simply be passed to the enemies like this:

func knockback(direction: Vector2) -> void:
	velocity = direction
	await get_tree().create_timer(0.2).timeout 
	velocity = Vector2.ZERO

Note here that direction isn’t just the direction of the knockback. It also uses the length of the vector as its strength. If you prefer the two to be seperate tho, you can change the function to accept the two arguments separately. Really just depends on preference.

I tested the code real quick and there doesn’t seem to be any need for to_local() or to_global() convertions. Let me know if it works for you. :>