Movement Script for Character Motor

I tried adding this script to the character motor so that the player can order characters to march (Im developing an 18th century military game). I get an error saying CharacterMotor.js(116,4): BCE0044: expecting (, found ‘Input’ and an error saying BCE0043: Unexpected token: …. Sorry if I made some noobish mistakes:

var March : boolean = false;

if Input.GetButton ("left shift") {
	maxForwardSpeed/2;
	maxBackwardSpeed/2;
	maxSidewaySpeed/2;
	March = true;
	}

I did not want to add this to the character motor but im not sure if I can change variables from another script. Would be great if someone could answer my questions! Thank you in advance :smiley:

Your conditional statement must be within parenthesis. Translation : your if statement needs to be encapsulated in brackets :

if ( some condition == true )
{
     // do stuff
}

so for your script :

var March : boolean = false;
     
if ( Input.GetButton ("left shift") )
{
    maxForwardSpeed/2;
    maxBackwardSpeed/2;
    maxSidewaySpeed/2;
    March = true;
}