Trying to launch a rigidbody towards mouseposition but nothing makes it work.

I’m making a 2d platformer where you can launch yourself towards the place where the player clicks. I’m new to unity and none of the answered questions here seem to solve my problem. I’m using a rigidbody and the part of the script that won’t work is as follows:
void FixedUpdate () {
float move = Input.GetAxis(“Horizontal”);

    body.velocity = new Vector2(move * maxSpeed, body.velocity.y); //basic player movement

    if (Input.GetMouseButtonDown(0)){
        mousePos = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
        direction = (mousePos - body.position);

     }
    if (Input.GetMouseButtonUp(0))
    {
        direction.Normalize();
        body.AddForce(direction * jumpForce);
    }   

For some reason the AddForce function does nothing to the player and I’m just clueless at the moment. Using other people’s code won’t work either because I’ve tried A LOT.

Have you debugged the code? What is the values for direction? What is the value of jump force? Also, try ForceMode.Impulse as the second parameter of AddForce.

EDIT:
Second issue was that the script above is modifying the rigidbody’s velocity directly. This will cause the physics engine to require a recalculation and skip a few frames and can result in bad behavior. Rigidbodies should be moved by AddForce or one of the methods in the Rigidbody class.