My robot is not driving in autonomous using the ez-template

I am using the chassis.pid_drive_set(); command to move my robot during autonomous operation. However, when the autonomous operation is run, all other functions, such as the mobile goal clamp and the intake, work. The code also works properly and can be driven by driver control.

ps.
VEX is not letting me attach my file so it would help if someone could tell me how.

I recommend watching this video https://youtu.be/jqqtNL1mDsk and using a vex net competition switch

Are you able to copy paste or attach a screenshot

Thanks, but I solved it by adding a inertial sensor