How do I tween CFrame and CFrame angles at the same time (uwu)

I want to tween a part to move 100 studs to It’s left, and at the same time I want the part to be spinning but I don’t know how to achieve that

This is my current non-working script:

local timetoComplete = 22
local offset = -100

local move = TS:Create(nado, TweenInfo.new(timetoComplete, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {CFrame = nado.CFrame * CFrame.new(0, 0, offset), CFrame = nado.CFrame * CFrame.Angles(math.rad(360), 0, 0)})
move:Play()

I’ve tried tweening the position and the CFrame.Angles at the same time but the part just went to the void instead of 100 studs to it’s left.

I know this is not related to the post but I just wanted to state that mayonnaise is heavily overrated

Try tweening CFrame and Orientation rather than 2 CFrames. Unless it has to be CFrame, then don’t do this

1 Like

CFrames have both Position and Rotation values in it, meaning you could do

CFrame = nado.CFrame * CFrame.new(0, 0, offset) * CFrame.Angles(math.rad(360), 0, 0)

I added Position and Orientation together to make a CFrame

Daddy It worked but the issue is I want the the part to spin way faster than it moves

If you would like the position speed to remain the same but the orientation speed to change then have two different tweens with different time to achieve it. (and loop the faster one until they are both done!)

local timetoComplete = 22
local offset = -100

local spinning = true
local spinSpeed = 1 -- degrees

-- moving the nado
local move = TS:Create(nado, TweenInfo.new(timetoComplete, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0), {Position = nado.Position * (CFrame.new(0, 0, offset).Position))
move:Play()

move.Completed:Connect(function()
    spinning = false
end)

-- spinning the nado in Y direction
task.spawn(function()
    while spinning do
        nado.Rotation += Vector3.new(0, math.rad(spinSpeed), 0)
        task.wait()
    end
end)

Using position only moves the basepart, not the rest of parts of the model

Making one tween that moves and another one that rotates it using CFrame.Angles() just overlaps the first one and it remains still (?

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