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?

		local ray =, (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 ="Part")
		part.Anchored = true
		part.CanCollide = false
		part.Transparency = 0
		part.BrickColor ="Pink")
		part.Material = Enum.Material.Neon
		part.Size =, 0.3, distance)
		part.CFrame =, tool.Fire.Position) *, 0, -distance / 2)
		part.Parent = workspace
		game:GetService('TweenService'):Create(script.Parent.Slide1,,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0),{CFrame =}):Play()

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.