Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I think that, maybe, you should declare the variable as public and not implicitly private. Instead of using the SerializeField, try using Public GameObject weaponSockets; But I think you dont want it to be accessed by everyone
In if (direction.magnitude >= 0.1f), use GetComponent to get CinemachineFreeLook component and use the methods SetActive(false) to disable it. Is it what you want?