I want to access the FirstPersonController script on my Player GameObject to access the m_IsWalking boolean to find out if the player is walking and play an animation if they are and Idle animation if they aren’t
I’ve Tried:
FirstPersonController script = GameObject.FindGameObjectWithTag(“Player”).GetComponent(“FirstPersonController”);
Bool isWalking = script.m_IsWalking;
AND I’VE TRIED
FirstPersonController script = GameObject.FindGameObjectWithTag("Player").GetComponent<FirsPersonController>;
Bool isWalking = script.m_IsWalking;
Could someone tell me how to access the m_IsWalking boolean from another script?