Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What is better when moving a model, MoveTo() or Setting a primary part then moving it?

So my situation is I am trying to move a model to a certain position

but I was wondering about 2 solutions

workspace.Model:SetPrimaryPartCFrame(CFrame.new(0,50,0))
workspace.Model:MoveTo(Vector3.new(0,50,0))

Which is better I am trying to move them to a certain position to face the camera

Also when should you use SetPrimaryPart and MoveTo

1 answer

Personally I never use MoveTo(), I always use SetPrimaryPartCFrame()

But being honest, I don't think it really make much of a difference.

Although MoveTo() does have a slight difference in behaviour, if there's any obstacles in the way of where the model has been moved to, then it'll continue to be moved up in the Y direction until there are no more obstacles. If you don't want this behaviour then SetPrimaryPartCFrame is the function for you.

1 comment

0

Hope this helped :)

This discussion is preserved as it was. New answers, comments, and votes are closed.