Need help with slope movement

Hey so i am trying to prevent the rigidbody from sliding down slopes when not moving the problem is as soon as i stop moving i bounce up a bit like shown here
if anyone has an idea of what could resolve the problem i would mean so much

//Stops player from sliding when not moving on a slope
        if (playerScript.inputScript.input.x == 0 && playerScript.inputScript.input.y == 0)
        {
            print("stopping on slope");
            Vector3 slopeGravity = Physics.gravity * playerScript.rb.mass;
            playerScript.rb.AddForce(-slopeGravity);
        }

gravity is a downward vector (default). And when you write playerScript.rb.AddForce (-slopeGravity); in fact, you flip this vector directing it up. Try

playerScript.rb.AddForce (slopeGravity);