Can't change Constant Force's value in the code

I want to make elevator. For that I’m using Constant Force, but when I try to change it’s value in the code, I’m getting an error:
Cannot modify a value type return value of `UnityEngine.ConstantForce.force’. Consider storing the value in a temporary variable.

GameObject elevator;

void Start () {
	elevator = (GameObject)this.gameObject;
}

void Update () {
	if (elevator.transform.position.y >= 10)
		elevator.constantForce.force.y = 0; // Error
}

You have to set the elevator.constantForce.force to a variable and then change the y of this variable. after that you have to set your elevator.constantForce.force to the variable.

Like that:

    GameObject elevator;
     
    void Start () {
    elevator = gameObject;
    }
     
    void Update () {
    if (elevator.transform.position.y >= 10)
    Vector3 force = elevator.constantForce.force;
    force.y = 0;
    elevator.constantForce.force = force;
    }