How to change the position of a model by a script?

It’s possible to change the position of one part with a script by Vector.new.
But is it possible with a model?

8 Likes

Yep, there’s a MoveTo(destination) function that moves the model to the destination.

Example:

local Model = game.Workspace.Model
local WhereItShouldGo = Vector3.new(5, 10, 3)

Model:MoveTo(WhereItShouldGo)
6 Likes

Be advised, :MoveTo() always uses collisions. Your model might be positioned too high using it.

2 Likes

Is there any other way that would work the same as MoveTo? I suppose you can weld everything to one part and change that part’s CFrame. Cframe doesn’t use collisions, right?

2 Likes

Modifying the Model’s PrimaryPart position can be a solution

1 Like

Positions use collisions tho, and would you have to weld all the parts to the primaryPart to make them move with it, or would they just move with it anyway?

1 Like

They just move with it. (30 characters hsbdgdbsjsgsbxjshbs)

3 Likes

Oh, so then SetPrimaryPartCFrame(CFrame) is probably better than MoveTo.

local Model = game.Workspace.Model
local Destination = CFrame.new(5, 10, 3)
Model:SetPrimaryPartCFrame(Destination)
4 Likes