Car Automatically Moving

In my game I have a car racing scene and I have my car perfectly set up and the car its racing has a script that makes it shoot out like a bullet but then eventually slow down and stop. here is that script:

var speed : float = 5.0;
yield WaitForSeconds(6);
rigidbody.velocity = transform.forward * speed;

I know its very simple. Can i Have a script that makes it constantly move? thanks.

You code doesn’t make much sense for the problem you are trying to solve. You want to look at your Update function more closely; this is where your solution will go.

rigidbody.velocity = transform.forward * speed;

this part is correct, but being used in the wrong place. Try putting it in the update() function and see what happens. :slight_smile: