Using Tweenservice on 2 parts welded to each other inside a ViewportFrame won't really work (SOLVED!)

Hi, I have a problem with tweening parts which are inside a ViewportFrame. It`s a book which is supposed to open with these lines of code:

local GuiPageRotatingPart = ViewPortFrame.RecipeGuibook.BookLidRotatingPart
	local OpenGuiTweenInf =, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local OpenGuiTweenGoal = {CFrame = GuiPageRotatingPart.CFrame * CFrame.Angles(0, 0, math.rad(180))}
	local OpenGuiTweenAnimation = TweenService:Create(GuiPageRotatingPart, OpenGuiTweenInf, OpenGuiTweenGoal)

(The green line here shows how its welded to each other.)

Now I have a problem. I’ve read some posts where people say that ViewportFrames have diffrent dynamics than in the workspace. So that means welds won’t work as they are supposed to.

The only thing spinning here is the small red marked part which is supposed to spin the booklid with it because it’s welded to each other.

(And yes everything is how it’s supposed to be. Everything is correctly welded and not anchored except if something needs to be anchored. It also works if I put it into the workspace.)

If there isn’t a way to do it with welds inside a ViewportFrame, do I need to do it with a script? And how would I make it rotate like this?
(This is the same model but in the workspace instead of the ViewportFrame inside the PlayerGui)

I don’t think you can do what you’re trying to do in vpf (with tweenservice anyway), if you tested it in workspace and it worked that would prove that.

anyway I’ve worked with vpf, you should either rotate camera around the object or spin the obj itself by its primary part (updating cframe constantly manually by doing pivotto() or some). you’ll need to look for the code I’m sure there are resources.

I’m honestly not sure if this will work but its worth a try.
Try placing the model in a WorldModel and changing the path appropriately

Sorry but I don’t really get what you mean.

  1. Should I place it in a WorldModel like this inside the ViewportModel?

  2. I dont understand what you mean with changing the path appropriately

Could you explain it for me please?

I recommend not using TweenService here. I would use some CFrame math instead.

For everyone who will see this post in the future and has the same problem, I have found a solution.
I have found something that solved my problem

this is the script which rotates something from a selected point:

local Pivot = SelectedPart.CFrame *, -0.076, -0.888) -- add the pivots CFrame or a diffrent CFrame
	local Offset = Pivot:Inverse() * SelectedPart.CFrame
		Pivot *= CFrame.Angles(math.rad(-5), 0, 0)
		SelectedPart.CFrame = Pivot * Offset

(This isn’t my script)