Tweening a moving part?

So i’ve spent 30 minutes trying to tween this one part of a gun I am trying to do, like animate the chamber when fired and it’s not working but only on anchored how do I get around this and fix rotation when it’s done?

--//RayCast\\--
		local ray = Ray.new(tool.Fire.Position, (mouseHit.p - tool.Fire.Position).unit * 300)
		local hit, position = game.Workspace:FindPartOnRay(ray, tool.Parent)
		local distance = (position - tool.Fire.Position).magnitude
		local part = Instance.new("Part")
		part.Anchored = true
		part.CanCollide = false
		part.Transparency = 0
		part.BrickColor = BrickColor.new("Pink")
		part.Material = Enum.Material.Neon
		part.Size = Vector3.new(0.3, 0.3, distance)
		part.CFrame = CFrame.new(position, tool.Fire.Position) * CFrame.new(0, 0, -distance / 2)
		part.Parent = workspace
		game:GetService('TweenService'):Create(script.Parent.Slide1,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{CFrame = CFrame.new(script.Parent.SlidePos1.Position)}):Play()
		wait(1)

For a moving part on a moving body like a welded gun the procedures are different. When you CFrame a welded part the entire body will be moved instead of a specific part you want.

So there are two options:

  1. Tween the Weld C0 or C1.

  2. Let animations do the C0 animations themselves (with .Transform) using the Roblox animation system.