variables not changing

Can someone help me with my code? im not getting any errors it’s just not working (btw this is added onto the first person character motor script and i have added a custom input)

if (Input.GetButtonDown("shift")) {
    maxForwardSpeed = 18.0;
    maxSidewaysSpeed = 12.0;
    maxGroundAcceleration = 40.0;
}
if (Input.GetButtonUp("shift")) {
    maxForwardSpeed = 9.0 ;
    maxSidewaysSpeed = 6.0 ;
    maxGroundAccelleration = 20.0 ;
}

please actually answer instead of posting a link to somewhere that doesn’t ened up helping me at all

try to use

Input.GetKeyDown(KeyCode.leftShift)

and

Input.GetKeyUp(KeyCode.leftShift)

You can use also rightShift if you need it.

From the errors you get, it seems that you’re trying to add code to the default CharacterMotor script, but are doing so in a separate function Update() { ... } block. You can’t have two events with the same name in CharacterMotor. The easiest solution would be to add your code inside the existing Update() block.

Note however that input is by default already handled in the Input Controller scripts, by referencing CharacterMotor so that movement and input are in separate scripts. It should be easier to just add your code there, by adding proper references (e.g. motor.maxForwardSpeed = 18.0;) and such.