I need to stop a rotation of an object after a certain amount of turns or after a certain amount of time. I can get it to rotate just fine when I press a go button, but not sure how to make it stop without have to press a stop button. Can i add some script to make it stop after a certain amount of time or a certain amount of rotations. This is the code I am using for the spin. Thanks.
var speedforChange: int;
function Update () {
amtToMove = speedforChange * Time.deltaTime;
if(ControlScript.triggerGo == 1){
transform.Rotate(0, speedforChange*Time.deltaTime,0);
}
}