Rotate model with tween, how?

Here is how to rotate a model with a tween:

  • Anchor a main part that will be used as the center of movement
  • Unanchor the other parts
  • Weld the other parts to the main part
  • Tween the main part

If you’re doing the tweening on the server, you can make the tween smooth on the clients using the community module TweenService V2:

welp, ive tried that already, what u suggested, and it didnt work, idk about the tweenv2 tho

If you change the “goalPart.CFrame” to “goalPart:GetPivot()” it should work

local TweenService = game:GetService("TweenService")
local movingModel = script.Parent
local goalPart = script.Parent.Parent.Point1

do
	local cfv = Instance.new("CFrameValue")
	cfv.Value = movingModel:GetPivot()
	cfv.Changed:Connect(function(new_cf)
		movingModel:PivotTo(new_cf)
	end)
	local tween = TweenService:Create(
		cfv,
		TweenInfo.new(
			4, -- time
			Enum.EasingStyle.Cubic,
			Enum.EasingDirection.InOut,
			-1, -- repeat (-1 = inf)
			true, -- reverse?
			0 -- delay
		),
		{
			Value = goalPart:GetPivot()
		}
	)
	tween.Completed:Once(function()
		cfv:Destroy()
	end)
	tween:Play()
end

If you set it up properly it will work. If it doesn’t move properly, make sure none of the other parts are anchored. If it falls apart, make sure all the parts are welded.

What i have done:

-Weld all parts together
-Unanchor all aprts except primary part

This hasnt solved the issue tho

i was wondering this, like shouldnt i have done something like with pivot to get the cframe of the model?

But ill try that later or tomorrow

YOOOOOO FINALLY IT WORKED IT FINALLY WORKED!

After DAYS OF RESEARCH AND ASKING FOR HELP, IT FINALLY WORKED!!!

THANK YOU!

I knew it had to do something with the getpivot of the other model basically indicating its “Cframe”, gosh i just didnt know how to do it

Thank you @hkep and @LwgoVlr for fixing the tiny mistake in the code! You guys are the best!