I need a simple script that ups the players movement speed times 2 for a set amount of seconds. Here is what i got. Also I am attaching this to a simple sphere and setting it as a trigger.
var speedUpTime : float = 5; // How long do you have a speed boost
var speedUpFactor : float = 1;
var controller : CharacterController;
function OnTriggerEnter(hit : Collider){
// //Did we hit the object
if (hit.gameObject.tag == "Player"){
// //get the speed var from character motor script
CharacterMotor.Speed = 15;
}
}