Stop Motors in Autonomous

I am trying to get my robot drive forward for three seconds and then stop but the computer isn’t recognizing to the stopMotor task. Any ideas?
task autonomous()
motor(port2) = -127;
motor(port3) = -127;
motor(port8) = -127;
motor(port9) = -127;


Did you call the “stop all motors” a task? If you did then you need to tell it to start like this:

StartTask (stopAllMotors);

You will also need to stop the task when you want it to stop in the same manner.
I wouldn’t recommend doing this via a task though, i would recommend just assigning each motor a value of zero instead; that’ll make it much simpler.

No I didn’t, do I need to for it to work?

I will try that. Thanks!

stopAllMotors() is a natural language function, It is not a task.