Tweening problem

Making a door open through pulling a lever, The lever tweening works but the gate when it opens it should go to the certain y axis value but it just goes really far to a different spot without me changing it’s x or z axis and it doesn’t even go to the y axis I specified it to go to, Any idea?
Script:

local Sound = script.Parent.Sound
local Hinge = script.Parent.Parent.Parent.PrimaryPart
local MetalBar2 = game.Workspace.MetalBar2.PrimaryPart
local Tween = game:GetService("TweenService")
local Info1 = TweenInfo.new(
	1,
	Enum.EasingStyle.Bounce,
	Enum.EasingDirection.Out,
	0,
	false
)
local Info = TweenInfo.new(
	20,
	Enum.EasingStyle.Bounce,
	Enum.EasingDirection.Out,
	0,
	false
)

local OpeningTable1 = {
	CFrame = MetalBar2.CFrame * CFrame.new(MetalBar2.Position.X, -51.437, MetalBar2.Position.Z)
}

local OpeningTable2 = {
	CFrame = Hinge.CFrame * CFrame.Angles(math.rad(-90), 0, 0)
}
local TweeningPlaying = Tween:Create(Hinge, Info1, OpeningTable2)
local TweeningPlaying2 = Tween:Create(MetalBar2, Info, OpeningTable1)

script.Parent.MouseClick:Connect(function()
	Sound:Play()
	TweeningPlaying:Play()
	game.Workspace.GreenPart1.BrickColor = BrickColor.new("Lime green")
	print("Opening the first one")
	TweeningPlaying2:Play()
	print("Opening the second one")
	wait(0.5)
	Sound:Destroy()
end)

Is the problem repetitive or does the door always go to a different spot?

It goes to the same spot always

Well then try messing about with the values of your tween

Hm but that wouldn’t change it I have already set x and z to the original ones it’s just the y it should go up idk why it goes to the end of the map

It looks like the problem is in openingtable1, when you multiply cframes, it is basically adding them. This means that you are adding -51.437 to the metalbar2 cframe y axis. You are actually adding the x and z axis on top of the actual position, which us why it moves so far. I suggest reading up on the use of cframes.

Yo well you were correct lol I shouldn’t have multiplied it, Anyways it now does go up to the point I want it to but it apparently rotates? idk why it does that, Any idea?

I would need to see the adjusted code you made for openingtable1.

There you go

local OpeningTable1 = {
	CFrame =  CFrame.new(1278.048, -51.151, 200.044)
}

Sometimes when you rotate or turn an object while creating it. What appears to be up and down is actually sideways. As all the axes have been changed. IDK if that is your problem or not. You should try to break this down to just your problem spot. Try to just tween the door only untill you get that working. Then come back and add the rest.

Yeah well it was the multiplying that made the problem tho still don’t know why it rotates…It goes up but rotating