How to tween a model correctly

Hey, I am currently wanting to rotate a model 180 degrees using tweenService. I know that there are multiple posts about this, but, none of them use the new method, PivotPoints (the other posts use the deprecated methods).

In short: I want to tween the orientation of a model.

Thank you for any help!

1 Like

You cant actually tween using pivot points (Its just the nature of how they are made), you need to just tween primary part

also i got a module for that

1 Like

Thanks for responding :slight_smile:

With regards to this:

I saw that @colbert2677 wrote this:

Am I just misunderstanding him, or what does he mean?

Looking forward to a response!

Mine does not use SetPrimaryPartCFrame :smile:, it actually just tweens the primary part (if exist else a random part is selected), so its basically tweening a part with a few extra steps.

Ok, thanks. In your module, do I need to weld the parts in the model or does the module do everything for me?

it does everything for you, but i recommend just making sure to set a primary part which is located near the center of the model just for more accurate rotation.

1 Like

Great stuff my man! Thanks for everything

1 Like

I wrote this tutorial some time ago to describe the best method for tweening models at the time that didn’t involve the use of SetPrimaryPartCFrame or a custom implement of the function where you calculate all the offsets by hand. SetPrimaryPartCFrame suffered from floating point imprecisions that would tear a model with each call with it being noticeable over a long period of time.

Since the advent of pivots, moving models is very efficient with PivotTo and doesn’t suffer from the floating point imprecisions that SetPrimaryPartCFrame did. This note is to point to the fact that developers can use the “old” method of tweening models (by proxy - you tween a CFrameValue and then have the model’s CFrame adjust according to the current value every step) now that pivots exist and SetPrimaryPartCFrame is deprecated, ridding of model tweening’s most glaring issue.

The method in that thread is physics-reliant while moving models by a pivot doesn’t require you to hook into the physics pipeline (no unanchoring, no welds). This is also important for experiences that require joint-destroying instances like explosions to hit tweening models without destroying their joints. Anchored assemblies will maintain shape while welded ones won’t assuming you want the vanilla joint destruction behaviour of explosions and don’t want to write the hit checking logic yourself.

1 Like

Thank you for this clarification, and nice seeing that you’re still around on the forums!

I’ve tried finding tutorials that use the new method with pivots, but to no avail. I’ve also tried reading the official Roblox documentation but I cannot figure out how I use it to tween models. Do you have any good sources on that or any tips?

Thanks again!