How to make a car move and follow a road

I made a car model for my gasa4 game and I want it to move across a road but the road isn’t just straight its goes straight then up and then straight again so how could I make the car model follow the road probably making it c frame to parts above the road

1 Like

bump?

1 Like

no bump :frowning:

try this: Use an npc, weld it to the car, make in invisible with no face, make a part in workspace and place it where you want the car to go, then put a script in the npc that makes it move to the part that you made it workspace

sorry for late response but I could do this not sure if it’s the best Tho since I could just move the car right? isn’t the npc pointless
also, I’m guessing I would use a c frame right I can’t code at all lol, but I would see frame it to the part on the road where I want the car to go

No what i mean is that since the npc is welded to the car the car will move automatically( unless you want it to move when the player drives it, i dont know )

Ik it would move with the car but like whats the point its like im moving the npc that is welded to the car or just directly moving the car

no I dont want the player to drive it just for the car to move

For example here is an npc going to a certain part in workspace while moving a part that’s welded to it, you could do this with your car too (make sure its unacnhored)

ive made AI cars using this method

Bezier curves could be used.

2 Likes

Really? How “smart” are they?

Could you DM a video of them in action?

hmm i mean it works but its just more complicated

im not sure how to code it though

Oh i meant that they just go in a straight line ( i could add pathfinding but im bad at scripting )

1 Like

Which method do you intend to use?

sorry ive been busy trying to find a way to make this work so sorry for late response
but im probally gonna use the npc method were its welded to the car and follows certain parts

they seem a little comlicated im a modeller so i know how to use them in blender is it simalar? or is there a different way to make them in studio then just exporting from blender

There is some easy maths behind bezier curves; I believe that constructing one bezier curve is straightforward, however making multiple can be useful but difficult for someone with little scripting knowledge.
I’m not sure if it’s similar to blender.

1 Like

I still feel like its better if I just c frame the car instead of adding an npc into the car model but idk

Including a dummy in your model is an unusual approach.

ye thats what I was thinking
just making the car c frame is berrer

I agree, however this means that if you want to add a new road, for example, you must manually enter the coordinates.

1 Like