How to tween models?

So im making this building system and I want to make this effect where the model just moves to the next position the player taps in with a cool tween effect. I have a primary part for the model which is a part wrapped around all of the objects. Does anyone know a solution?

7 Likes

Set a primary part, weld all other parts in the model to it, then tween the CFrame of the primary part. Tweening its position will only move the primary part and not the whole model.

7 Likes

or instead of TweenService u can use Model:PivotTo() with :lerp( for smoth movement )

3 Likes

Here is a starting point

2 Likes

How do I use this lerp function?

2 Likes

Personally, I typically opt for tweenservice, but yeah, both work.

3 Likes

Is there a way I can use this without welding?

2 Likes

Probably not easily. Without them welded, even with tweening the primary part’s cframe, only the primary part is going to move.

2 Likes

Oh because I already created a lot of models. Is there a way to not tween them but to add a little effect when the model moves to make it look smooth?

2 Likes
CF = -- model cf
CF2 = --cframe that model will be moved to


Model:PivotTo(CF:Lerp(CF2, 0.4))

1 Like

Just use lerp, like @Im_Magni just showed you.

1 Like

Okay this code looks like it will probably work

1 Like

Thank you I think this was indeed the solution

1 Like

srry if there is one error, im writing on mobile

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.