PivotTo() & MoveTo()

What are the differences between PivotTo() and MoveTo()? I couldn’t find any real useful information here on the developer forum, or on the documentation pages. I asked a friend and they couldn’t provide any useful help to me, so I am coming here. I use PivotTo() purely because I’ve been told to, but I was mainly just wondering is it better to use PivotTo() or MoveTo(), and the pros and cons.

It is just 3 googles away. PivotTo() / MoveTo() / MoveTo() (For Humanoids)

3 Likes

moveto gets an npc to walk to a position and pivot to moves a parts/models cframe

1 Like

You’re wrong. Its :Move() not :MoveTo(). (kind of, depends on what instance your using.) For humanoids :Move() and :MoveTo() makes them move while for model :MoveTo() just moves the model.

1 Like

PivotTo() ignores collisions when setting the positions of parts or models, while MoveTo() is used mainly for Humanoids to make them walk to a certain location.

1 Like

:Move is deprecated, it’s better to use :MoveTo

1 Like

Key differences between PivotTo and MoveTo:

Google brought me to your comment though :slight_smile:

I know this post isn’t exactly new but I wanted to share the exact difference between the two.

Assuming you’re talking about the "MoveTo" method of Models, not Humanoids, then it’s simple:

  • PivotTo() moves the model to a certain CFrame by “using the CFrame property”
    It’s equivalent to Part.CFrame = CFrame

  • MoveTo() moves the model to a certain Vector3 by “using the Position property”
    It’s equivalent to Part.Position = Vector3

Knowing that, I recommend you use PivotTo, It’s just cleaner.


Moving stuff through the CFrame will also move anything that’s welded to it. But this doesn’t happen when moving stuff through the Position.

(Of course, MoveTo() will also move every part inside the model regardless of them not being welded, but It’s something to know)