Is it possible to Tween a model using 2 different tweens?

Bascially, I’m trying to animate weapon and health pickups to both levitate and rotate but I have failed every attempt.

I’m struggling with the fact that the only way to tween models is to use the model’s primary part CFrame but since I want it to levitate and rotate at different speeds, I have not been satisfied the way it turns out.

Solutions I have tried:

  1. Use the model’s primary part CFrame to both levitate and rotate. Problem: It is not what I want.

  2. Create 2 tweens for levitation and rotation using the model’s primary part position and orientation. Problem: I have to move every child in the model.

  3. Create 2 tweens for every part in the model. Problem: the child parts are not lined with the primary part.

  4. Make the model 1 mesh. Problem: Materials and textures frighten me :stuck_out_tongue:

  5. Use a Motor6D to levitate the model. Problem: I did not achieve anything, but maybe I didn’t try enough.

So, is it even posible?
Theres something I did not try?

Some code:

-- Levitate animation info
local levitateTweenInfo = TweenInfo.new(
	.6, -- Time
	Enum.EasingStyle.Sine , -- EasingStyle
	Enum.EasingDirection.InOut, -- EasingDirection
	-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
	true, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)

-- Rotate animation info
local rotateTweenInfo = TweenInfo.new(
	2, -- Time
	Enum.EasingStyle.Linear,  -- EasingStyle
	Enum.EasingDirection.InOut, -- EasingDirection
	-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
	false, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)

-- Moves every part--
for i, model in ipairs(self.primaryPart:GetChildren()) do
    -- Levitate Animation Loop
    local newPosition = model.Position + Vector3.new(0,0.5,0)
    local levitateTween = tweenService:Create(model, levitateTweenInfo, {Position = newPosition})
    levitateTween:Play()
    
    -- Rotate Animation Loop
    local newOrentation = model.Orientation  + Vector3.new(0,360,0)
    local rotateTween = tweenService:Create(model, rotateTweenInfo, {Orientation = newOrientation})
    rotateTween:Play()
end

1- I don’t really get your question right
2- tweening chooses the closest path to 360

I just want my pickup models to spin using linear easing and bounce using sine easing.
Thanks for replying btw.

About the Rotating it how about you update the angle you want constantly 1 degree instead of tweening it.

Sadly, that’s not a soulution for my problem since you need CFrames to rotate the entire model and I can’t find a way to do both spining and bouncing animations using CFrames.

Heres some code to do that for anyone interested:

local lastUpdate = tick()
heartbeat:Connect(function(deltaTime)
    if model then
        local timeSinceLastUpdate = (tick() - lastUpdate)
        if timeSinceLastUpdate >= 0.01 then 
            lastUpdate = tick()
            local newCFrame = model.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(2), 0)
            model:SetPrimaryPartCFrame(newCFrame)
        end
    end
end)

Something like that would work:

local runservice = game:GetService("RunService")

runservice.Heartbeat:Connect(function()

script.Parent.Orientation = script.Parent.Orientation + Vector3.new(0, 0.6, 0)

end)

local service = game:GetService("TweenService")

local info = TweenInfo.new(

5,

Enum.EasingStyle.Linear,

Enum.EasingDirection.In,

1/0,

true,

0

)

local goal = {}

goal.Position = script.Parent.Position + Vector3.new(0, 0.6, 0)

local player = service:Create(script.Parent, info, goal)

player:Play()

5,

Enum.EasingStyle.Linear,

Enum.EasingDirection.In,

1/0,

true,

0

)

local goal = {}

goal.Position = script.Parent.Position + Vector3.new(0, 0.6, 0)

local player = service:Create(script.Parent, info, goal)

player:Play()

You don’t change the angles you do something like what i did over here(orientation). Tweening chooses the closest path that’s why it doesn’t work.