Tweening model's primary part won't work

I’m trying to move a model 10 studs up in the span of 1 second with a sine-out easing style using a tween. I made a part named “Primary” and put it inside the model and made that part the model’s PrimaryPart. However, the tween doesn’t seem to work. Is there anything wrong with it?

TS:Create(map.PlatformUp1.Primary, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Position = map.PlatformUp1.Primary.Position + Vector3.new(0, 10, 0)}):Play()
1 Like

Is the PrimaryPart moving at all?

You Cannot Tween a Model, you can either Tween Every single Part, or Weld all Parts to the PrimaryPart and Tween it from there.

1 Like

I don’t know if this is only me, but for some reason, welding using WeldConstraints doesn’t work. Only motor6D does (idk if this is supposed to happen)

No, it is not

How do I do the second option?

Unanchor all parts expect primary part, make sure it is anchored.
WELD every single thing to the primary part.
Tween the primary part CFRAME!! Not position.

1 Like

You can tween models, and there is no need to weld parts together or even use primary parts.

No, attempting to do so will cause an error.

I looked into it but I have no idea what is going on in it

It builds a table of times going from 0 to 1 using Roblox’s interp methods (i.e. tweens) and uses those times to calculate the rotation and positions using the time steps stored in the table.

So all you have to do is tween your time range, and use those values to position or rotate your model.

I’m not that advanced yet lol

How do I tween its CFrame? (I’m not that good with understanding CFrame yet)

1 Like

Like this:

{CFrame = CFrame.new(x, y, z)} -- Sets new CFrame
-- add onto a Position:
{CFrame = Object.CFrame * CFrame.new(x, y, z)} -- Adds onto Existing CFrame

-- Rotation:

{CFrame = CFrame.Angles(rx, ry, rz)} -- Sets new Rotation (maybe new Position?)
-- add onto Orientation:
{CFrame = Object.CFrame * CFrame.Angles(rx, ry, rz)} -- Adds onto Existing Rotation
1 Like

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