How do i move models with TweenService?

If you think this is a duplicated post of this: How do i move models with Vector3? Then you’re wrong. I was asking how to move models with Vector3, now i want to know how do i move models with TweenService, so i can have an ease style and a duration:

I want to know how do i move objects with TweenService, currently, i just know how to move one object, i already searched in the developer hub, but there was not sufficent information to help me. Thanks for reading.

1 Like

The following post by @colbert2677 helped me tween models Introduction to Tweening Models - #13 by colbert2677

Heres a good function i found on another thread I’ve been using for a while

function ModelTween(model,CF)
	local tweenService = game:GetService("TweenService")
	
	local info = TweenInfo.new(1,Enum.EasingStyle.Bounce,Enum.EasingDirection.Out,0,false,0)
	
	local function tweenModel(model, CF)
	    local CFrameValue = Instance.new("CFrameValue")
	    CFrameValue.Value = model:GetPrimaryPartCFrame()
	
	    CFrameValue:GetPropertyChangedSignal("Value"):Connect(function()
	        model:SetPrimaryPartCFrame(CFrameValue.Value)
	    end)
	
	    local tween = tweenService:Create(CFrameValue, info, {Value = CF})
	    tween:Play()
	
	    tween.Completed:Connect(function()
	        CFrameValue:Destroy()
			
	    end)
	end
	tweenModel(model,CF)
end
7 Likes

Something cool I’ve realized if you want to do 2 or more tweens on one model then make a cframevalue for each tween and during each renderstep use the values of each cframe added to together on the model