Sprinting Code

I was trying to make my character sprint but when i press the spesific button it gets faster and stays in that speed all the time i just want it to get to that speed when i hold down the button.

My code:

//Kosma
		if (cc.isGrounded && Input.GetButton ("Vertical") && Input.GetButton ("Depar")) {
			movementSpeed = kosuHızı;


		}

try this :smiley:
if (cc.isGrounded && Input.GetButton (“Vertical”) && Input.GetButton (“Depar”)) {
movementSpeed = kosuHızı;
}else{
movementSpeed = normalSpeed ;
}
}
it shoud work fine :smiley: