Introduction to Tweening Models

One question i have is do you still use a hinge when you want the door to slide / move up and down?

Yes, I still use hinges and reference points for vertical and horizontal translations as well. The only difference there is that you’re changing the position instead of the orientation of the model.

1 Like

Hmm I thought it ment when it said a bounding box to make a part inside the model and make it the primary part but im still confused do i link the hinge to the bounding box then the model? Or is it diffrent?

Bounding box is the easiest way to do it but you can also use a hinge part lined up in any way to get the part to move. For translations it doesn’t matter so much as it does for orientations because ideally when rotating you want the hinge to stay in relatively the same place and rotate it by a corner rather than by another awkward angling.

Bounding box for translations is the same as the hinge part for the purposes of the tutorial, just that the operations being performed on them differs (translations vs orientations).

3 Likes

This method seems not working for rotating model.

it does work, you just didn’t do it correctly.

Is there any video clip online about how to achieve that?? :sweat_smile:

The tutorial itself shows you how to do it…?

Tween Info’s are not dynamic so when you want it to go back to its original position for closing you should just do

local DoorClose = TweenService:Create(Model.PrimaryPart, PanelSlideInfo, {CFrame = Model.PrimaryPart.CFrame}
1 Like

How so? The only way that I can find out on how to change the position of the model is through the Model:PivotTo(CFrame) function. I’m questioning how WOULD I tween it using this function and without using welds. I tried to change the WorldPivot property, but that just changes the position of the pivot itself and not bringing the whole model.

This is in documentation - WorldPivot changes the position of the pivot. Pivot properties only modify the coordinates of the pivot, PivotTo will bring along a model with the pivot’s coordinates in mind so that’s what you need to be using.

I made a brief note at the top of the OP explaining that PivotTo is appropriate to use with the legacy method if you’re looking for something convenient. PivotTo can be used as a drop-in replacement for SetPrimaryPartCFrame assuming the same setup and the pivot point being in the center of the primary part but the same will not go for changed pivots.

I’ve yet to modify the tutorial to accommodate pivots so I left that note at the top. I’ll probably find some time in the future to make sure the tutorial covers that option as well.

1 Like

Wow! This tutorial finally helped me understand how tweening works. Thanks for making this! I really need it. :slight_smile:

Yeah, so are we still stuck with using welds?

No? Please read what I wrote in my reply and the top of the thread again. The legacy method does not use welds and I mentioned that pivots can be used as drop-in replacements for the legacy problematic functions dealing with primary parts.

1 Like

Oh, my apologies. The legacy method can still be used with using the pivot functions, however, the downside still is with the CFrameValue. So as long as I do not interact with this value while it’s tweening, my model wouldn’t have any issues, right? And also, what about this?

Don’t you think welds are more of a performant option? Or am I missing something here?

It’s a bit of an overstatement but it’s comparing introducing a proxy instance for a quick movement versus applying the tween directly. Welded parts behave as if they’re anchored anyway but are constrained in relative space to the part they’re attached. Both are effectively updating CFrames in their respective steps.

I’ll update the thread with further information at a later date.

3 Likes

Do you tween the model on the server or the client? Because in the Server it does seem to throttle a bit. I wouldn’t use collisions on that specific model, but I was thinking of using it to collide with the golf ball on my game (which has its physics handled on the server).

Rule of thumb is to make the client responsible for the movement in most or all cases. The server will inherently be incapable of processing intermediates as fast as a client be it interpolation or physics. That being said, in the case of a physics-based golf ball there’s two possible routes I might go: have the rotation of the related obstacle also physically-simulated or push everything to the client and employ server validation for the golf ball (position tracking and the like).

1 Like

Oh, I guess I’ll try to physically simulate it then, because the other seems like it would give a noclip impression for some players. Thanks.

how can I make two or more model tween as the same time. For instance, I’m using this method to make a helicopter for my cutscene. I used this and I made the whole helicopter move, but I want the tail rotor and the top rotor to spinning around at the same time too. I tried to spin it by using CFrame.Angles but it just spin the whole model.