How to make a model with lots of parts move

Hey, guys. I am currently working on a game where cars go down a road (that’s actually a pretty small part of the game, but I don’t wanna get into specifics). I know how to make a part move, however, the model I am using has lots of part inside it. I can’t just copy and paste the script over and over again, because all of the parts are facing different directions, and also, it would take forever to do. Anyway, I am wondering, is there an easier way to make a car move down a road?

1 Like

Hello, I’m Awws. I’d be delighted to help today.

Could you please confirm how you are making the car move down the road? It is using CFrame or Physics?

1 Like

Thank you! It’s using CFrame, but is physics a better way to do it?

1 Like

No CFrame works fine. It’s what I use for my work.
The setup is as follows:

  • Use a weldconstraint to attach every part to a ‘base’ part
  • Unanchor every part but the base part
  • Only change the CFrame of the base part and every part moves with it.

It’s a bit weird and obscure but this does work! If you need anything, just let me know.

2 Likes

Uhhhhh this might sound really stupid, but how do you use a weldconstraint? I think I mostly understand this, btw. Basically, you would only have to move the base part, right?

To use a weldcontraint, set Part0 to be your base part and Part1 to the part that is your part to connect. Then make one for each part. You can parent them to wherever but I normally just keep them in the base part.

1 Like

I still dont get it :dotted_line_face:
Its not your fault, im just dumb, lol
Is it kinda like what it says here: WeldConstraint | Documentation - Roblox Creator Hub?

That is if you are using the constraint tool to add the constraints. Otherwise, the script would look like the example provided:

local weld = Instance.new("WeldConstraint")
weld.Parent = partA
weld.Part0 = partA
weld.Part1 = partB

This might help:

1 Like

Works great, thank you so much! :smiley:

No problem, can you mark my post about the setup as the solution to let others who see this know it is the solution? Thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.