How does one modify spring values?

Hi, I’m having a bit of trouble with modifying the spring values from a hingejoint. (using c#)

here’s my code

    if (Input.GetMouseButtonDown(1) && !opgepakt)
        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(ray, out hit, rayLength, mask))
            opgepakteShit = hit.transform.gameObject;
            opgepakt = true;
            opgepakteShit.hingeJoint.spring.damper = 2.0f

This is the error it gives me (which I don’t understand):
“Cannot modify the return value of “UnityEngine.HingeJoint.spring” because it’s not a variable.” How is this not a variable?

I’ve even tried copy pasting the exact code from the script reference:

It still gives me the same error, can somebody please help me understand what is going on? thnx

The answer is right here