How to fix my code

Our school just started a VEX EDR Comp team, and I’m a programmer. Since this is our first year, we don’t have anyone to teach us, so we study outsleves about RobotC Language. Right now I’m having a problem, where if you look at my task main(), even though I set my moveforward() function as 2.75 seconds, the robot tends to move forwared a lot longer. Same for my other functions such as scissorup() function. I thought by putting wait1Msec command, I will be able to fix this, but I couldn’t. Please help me.

my code:
#pragma config(Motor, port1, RFwheel, tmotorVex393_HBridge, openLoop)
#pragma config(Motor, port2, RRwheel, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port3, LFwheel, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, LRwheel, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port6, ClawMotor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port8, LeftScissor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, RightScissor, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port10, Wrist, tmotorVex393_HBridge, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

void moveforward(int t)
{
motor[RFwheel] = -80;
motor[RRwheel] = -80;
motor[LFwheel] = -80;
motor[LRwheel] = -80;
wait1Msec(t);
}

void turnleft(int t)
{
motor[RFwheel] = -127;
motor[RRwheel] = -127;
motor[LFwheel] = 0;
motor[LRwheel] = 0;
wait1Msec(t);
}

void pivotleft(int t)
{
motor[RFwheel] = -127;
motor[RRwheel] = -127;
motor[LFwheel] = 127;
motor[LRwheel] = 127;
wait1Msec(t);
}

void scissorup(int t)
{
motor[LeftScissor] = 127;
motor[RightScissor] = 127;
wait1Msec(t);
}

void scissordown(int t)
{
motor[LeftScissor] = -127;
motor[RightScissor] = -127;
wait1Msec(t);
}

void ClawRelease()
{
motor[ClawMotor] = -127;
wait1Msec(1000);
}

void pivotright(int t)
{
motor[RFwheel] = 127;
motor[RRwheel] = 127;
motor[LFwheel] = -127;
motor[LRwheel] = -127;
wait1Msec(t);
}

task main()
{
pivotleft(670);
moveforward(2750);
wait1Msec(1000);
scissorup(300);
wait1Msec(1000);
scissordown(200);
wait1Msec(1000);
ClawRelease();
}

Any time you command a motor to start, you must command it to stop or it will keep on running. The motors do not automatically stop just because the wait expires.

Consider a change that looks something like this:


motor[RFwheel] = -80;
motor[RRwheel] = -80;
motor[LFwheel] = -80;
motor[LRwheel] = -80;
wait1Msec(t);
motor[RFwheel] = 0;
motor[RRwheel] = 0;
motor[LFwheel] = 0;
motor[LRwheel] = 0;

Omg thx so much, it worked thx!