I can't change camera settings through script on a Cinemachine Tracked Dolly

I have a Virtual Camera and a Dolly Track as children on my Player.
I want to change the fov of my camera through script at runtime.
I tried the normal way of doing this which I can simplify as:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;

public class PPUI : MonoBehaviour
{

[SerializeField] PlayerMove Player;
[SerializeField] CinemachineVirtualCamera cinCam;

private void Start()
    {
    cinCam = Player.GetComponentInChildren<CinemachineVirtualCamera>();
    }

    public void changeFOV()
    {
    cinCam.m_Lens.FieldOfView = 120;
    }
}

This did not work when I run the changeFOV function. (I tested that the function did actually run with debug.log). I get no errors but the camera FOV does not change.

I think the reason why this did not work is because I am using a cinemachine tracked dolly instead of the typical cinemachine freelook cam (I have reasons for doing so) so I tried:

[SerializeField] PlayerMove Player;
 [SerializeField] CinemachineTrackedDolly cinCam;

 private void Start()
    {
        cinCam = Player.GetComponentInChildren<CinemachineTrackedDolly>();
    }
     public void changeFOV()
    {
    cinCam.VcamState.Lens.FieldOfView = 120;
    }
}

This did not work either because I get an error in the code. " Cannot modify the return value of “CinemachineComponentBase.VcamState” because it is not a variable.

I then tried:

    [SerializeField] PlayerMove Player;

    [SerializeField] CinemachineTrackedDolly cinCam;
    [SerializeField] CameraState camState;
private void Start()
    {
        cinCam = Player.gameObject.GetComponentInChildren<CinemachineTrackedDolly>();

        camState = cinCam.VcamState;
        camState.Lens.FieldOfView = 120;
   }
}

No errors, nothing happens.
Anyone know how to fix this?

cinCam.m_Lens.FieldOfView = 120 is the correct way.

If it’s not doing anything, then maybe you have some other code that’s overwiting it? Can you show the inspector of the vcam?

Sorry for the late reply. This was only a minor problem so I kind of forgot about it. I just now changed some of the code and now it works fine. I don’t know what I was doing wrong before.