How to access the properties of motion and speed "First Person Controller - Prefab Standard Assets"?

Hi I need access to maxForwardSpeed​​, the first person character, which is in standard assets, and that is what I’m used to the scene of my game I need the player to run when you press a button, but do not know how I can access these properties from another script, which is implemented within the component and the component class is Movement, and within this class of property you wish to access, and not how to do it because the GetComponent just shows me up script. or if you have any idea how I can make my character run without accessing the maxForwardSpeed ​​the “first person character”, so appreciate it.


I don’t have access to unity at the moment but have you tried:

var controllerScript = gameObject.GetComponent("FirstPersonController");

controllerScript.maxForwardSpeed = 1;

Please check the correct name of the script as this will likely fail as it is. If your controller is on another gameObject you will need to create a 2nd var to handle that.