Hi, I'm trying to generate traffic with AI

I am searching for the best way to create smart traffic

I don’t want the cars to change their path, but I want them to follow a long, straight path

I have tried the tweening service but it has some problems Or I didn’t program it correctly

so i need help

Important note: The road goes down and back and has many turns

1 Like

So the cars can not change their direction/path? It’s just one seted path?

Is it possible to show an image of your road? I’m having a hard time visualizing what you mean by:

You should edit your post to make it clearer.

You said you want it to follow a long straight path, but then you said it needs to go down and back (up and down?) and has many turns, which isn’t a ‘long straight path’.
Do you mean you have a curving, up and down road, but you want your vehicle to stay within the lines on the road?

1 Like

when i say i dont want the cars change their path i men i dont need the cars change the line on the road but the road have curve like this imge

Type ‘ai cars with nodes’ in the Search bar up top to have scripted movements of the cars.

The other way would be to put single rail tracks made of Parts hidden a few studs under the middle of each lane, then put 4 Parts around each track as a guide (1 per car) and use a CollisionGroup which only collides with itself for the rail parts and the guide parts.
I use this as a track for a boat to follow around between islands in one of my games.

Check this tutorial out, it should be what your looking for