Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Should I use Model:PivotTo() or Model:SetPrimaryPartCFrame()?

Asked by 2 years ago
Edited 2 years ago

The question is up there... Pros and cons? I've heard SetPrimaryPartCFrame() moves everything to keep offset, while PivotTo() calls itself on descendants... Would one be slowers?

2
SetPrimaryPartCFrame is deprecated, use PivotTo, cons of SetPrimaryPartCFrame: too long to type imKirda 4491 — 2y
0
Imkirda, deprecated isn't really a reason not to use it, a lot of games use it so I doubt it is bad for new work currently... And too long to type, what do you mean? Kingu_Criminal 205 — 2y
0
PivotTo does not need PrimaryPart, and it's shorter to type than SetPrimaryPartCFrame you get, it's long as  imKirda 4491 — 2y
0
Thank you for your response, can you put it as an answer so I might accept it or wait for more Kingu_Criminal 205 — 2y
View all comments (2 more)
1
wait for more im busy watching anime imKirda 4491 — 2y
0
What anime? Kingu_Criminal 205 — 2y

1 answer

Log in to vote
1
Answered by 2 years ago
Edited 2 years ago

It does not really matter what one you use as long as it works, :PivotTo() is in my opinion, easier and shorter to use. It is better for keeping the lines shorter. SetPrimaryPartCFrame is old and depreciated while pivotto is more new.

The main difference to think about whether or not you want to use a primary part, because :PivotTo() requires no primary part, when SetPrimaryPartCframe() does.

I do not believe one is slower than the other.

PivotTo

Ad

Answer this question