How do I move a model using scripts?

So, I have a model that has multiple parts in it, I have all the parts welded together, and when I move the models primary parts position in a script, it only moves the primary part, and not the rest of the parts. So what I’m wondering is, how do I move a model using scripts?

Thanks.

Set a primary part for the model, and move it using :PivotTo()

1 Like

If you’re using welds, the primary part has to be anchored and the rest of the parts unanchored.

Then you can use model.PrimaryPart.CFrame = ..., model:PivotTo(CFrame.new(...)) etc.

Welds will be used especially if you’ll be tweening the model, but you don’t need them if you’re going to keep the model static and anchored.

1 Like

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