Can't use rigidbody.AddForce to dash

So I am making a 2D top down game where player can move in any direction and face toward the mouse cursor. I am trying to use AddForce to make the character dash in his facing direction but nothing happen if I press the dash button.

void Update(){
        if(eCooldownLeft<=0)
        {
            if(Input.GetKeyDown(KeyCode.E))
            {
                eCooldownLeft = eCooldown; //set cooldown upon activation
                rb.AddForce(Vector2.up*dashForce, ForceMode2D.Impulse);
             
            }
        }
        else eCooldownLeft -= Time.deltaTime; //cooldown countdown
}

Here is the movement script for the character:

void Update(){
        movement.x = Input.GetAxisRaw("Horizontal");
        movement.y = Input.GetAxisRaw("Vertical");
        mousePos = cam.ScreenToWorldPoint(Input.mousePosition); //get mouse position
    }
    void FixedUpdate() { //make character faces toward mouse position
        rb.MovePosition(rb.position+ movement * speed * Time.fixedDeltaTime);
        lookDir = mousePos - rb.position;
        float angle = Mathf.Atan2(lookDir.y,lookDir.x) * Mathf.Rad2Deg - 90f;
        rb.rotation = angle;

I can use AddForce to projectiles and it works perfectly but I can’t do anything about adding force to the character. Am I doing anything wrong? Hope you guys can help. Thanks

Isn’t your character body kinematic?

The character is dynamic with a gravity scale of 0.

When you add force in update, it will be processed next frame only, but in the next frame FixedUpdate you call MovePosition and this cancels your added impuls. Instead of adding impuse in update, create a class field named impulseToAdd and do

private void Update() {
if(iWantToDash){
   impusleToAdd += dashImpulse;
}
}

private void FixedUpdate() {
var velocity = rb.velocity;
rb.MovePosition(...);
  rb.velocity = velocity;
  rb.AddForce(impulseToAdd, Mode.Impulse);
  impulseToAdd = vector3.zero;
}

I have set the time for AddForce, it does work but there is another problem. When I instantiate the character through the game handler, it can dash but if I use the character in the scene, it cannot dash. What’s the problem?