Is there anyway to move a model with a script?

Hello!

I would like to know how to move a model, which has multiple parts, meshes, etc, with a singular script. For example, scripting a plane model to move like an actual plane, which has no player controlling it.

I would like to know how to do this because I am making a script which moves a UFO around the map, to different points. I don’t have any knowledge on how to make any scripts like these, so I don’t have a sample script or anything.

Any questions feel free to ask!

Thanks.

1 Like

You can use MoveTo(), but that’ll teleport it there.

For literal movement it gets tricky with models
I normally use a WeldScript to have everything welded together, and set a PrimaryPart on the Model, then do everything to the PrimaryPart which should move the entire Model as it’s Welded (make sure it’s welded to the PrimaryPart).

That’s to my knowledge though, there may be other ways

1 Like

Alright, I will try it this way.

Use the Model’s PivotTo() method

1 Like

Or you can use AlignPosition component

1 Like

You could tween the models WorldPivot with TweenService to make the UFO go to different points.