How to move Character with AddForce

Hello Everyone. I wanted to create a physics based movement for my character.

    public float playerSpeed;
    public float jumpForce;

    public Rigidbody rb;

    Vector3 x, z;

    void Start()
        rb = GetComponent<Rigidbody>();

    void Update()
        x = transform.right * Input.GetAxisRaw("Horizontal");
        z = transform.forward  * Input.GetAxisRaw("Vertical");

        if (Input.GetKeyDown(KeyCode.Space))

    void FixedUpdate()

    void Movement()
        Vector3 movement = (x + z).normalized * playerSpeed;

    void Jump()
            rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);

I know I can use rb.velocity to set velocity but I also want to add force to the player from certain direction when certain key is pressed. The issue with rb.velocity is that when I am adding force with the movement key pressed the force is canceled as velocity is being overwrite.

Thats why I want to add force. If you have other method to solve this problem I will be grateful.
Thanks for reading.

I used this as a starting point for rigidbody player movement in Fossil Hunters and it worked very well, especially in our circumstance which involved the player constantly interacting with physics objects. Try it out!