How to make a truck AI?


So i’ve tried to use humanoid for this but that didn’t worked I also tried to tween it but that didn’t go well either. This might work though but I don’t know if it goes smoothlly all I know is that what I did didn’t go smoothly.

Can someone help me making this? Thanks a lot!

This completely depends on the situation.

If you want to make the truck like that Cook Burgers game, you use tweening. The truck moves to a certain spot. You can also use this to go on a trail. Otherwise, you could just use a normal pathfinder and have the ai walk to a point.

Well, the truck is going to get loaded then it drives away and turns immediately right. After that it goes right again, then the truck goes straid and then left, and then straight again.

You can use Tweenservice.

Tweens are used to interpolate things between each other, like colors or parts. You can tween a union in the format of a truck to different places to simulate driving. This would be a bit customizable as well.
You can also use humanoids. Its preference really

Make your truck contrallable from a script. The speed (tire rotation) and the steering.

Once you have that, you can use math to determine the steering angle and speed required to move to a position.

Obstacle avoidance will be a big problem. But you should stick with the basics first.

If the required path is always the same, AI is not needed (ex.: a freight train).