:MoveTo() vs :SetPrimaryPartCFrame(): What's more reliable?

Hello!

I am currently working on a system to load maps, which I have finally found a temporary solution for.

I was wondering which model movement system is more reliable between :MoveTo() and :SetPrimaryPartCFrame()?

:SetPrimaryPartCFrame() seems to have floating point errors when used a lot, however I was wondering if :MoveTo() would have these errors not happen?

I’m not worried about the precision of where the map is located, rather that the map stays in one piece if that makes sense.

Thanks in advance!

One’s not more reliable to the other, one is just faster. SetPrimaryPartCFrame is the faster option, but MoveTo takes account for collisions.

If you become better with scripting, switch to SetPrimaryPartCFrame because it is faster and if you know your math MoveTo is like something that you don’t really need anymore.

4 Likes

The MoveTo method will also work when the model does not have a primary part and it does not take any rotation into account, there is no speed difference between the two, but I would use SetPrimaryPartCFrame. Also, if your worried about the floating point errors of SetPrimaryPartCFrame then just clone the map each time you load it rather than using the same one, if your your making some sort of round-based game I recommend you store them in server storage to decrease the client’s memory.

2 Likes

The issue is the large amounts of lag that happens when the maps are parented to workspace.