Tweening a Part's Position

So I have a Model and it has two children that is a Model and a Part, the PrimaryPart of that Model is the Part and the Model child has two MeshPart’s and a Part and one of the MeshPart’s and the Part is welded to the other MeshPart which is the Handle and the PrimaryPart of the Model but when I tween the PrimaryPart’s position the welded parts do not follow it and they remain right in their old position and they aren’t even anchored. How would I fix this?

Code
    if Sword.Model.Handle:FindFirstChild("Weld") then
		Sword.Model.Handle.Weld:Destroy()
	end
	
	Sword.Model.Handle.Anchored = true

	TweenService:Create(Sword.Model.Handle, TweenInfo.new(1), {Position = goto.Position}):Play()
	
	Sword.Model.Swing:Play()
Objects

image

Details

The Sword’s PrimaryPart is Root.

Sword.Model’s PrimaryPart is Handle.

Root is welded to the character’s PrimaryPart (HumanoidRootPart) / Root is anchored before the object is cloned to workspace and when the script welds it to the character’s PrimaryPart it unanchors.

Handle is welded to Root / Handle is also unanchored (it anchors when it’s being thrown).

Outline and Hit are welded to Handle / both are unanchored.

Updated the displayed information above to make it more understandable.

what is this goto.position thing?

You need to tween the CFrame of the PrimaryPart to get the other parts to move. The other parts shouldn’t be anchored, and should be welded to the PrimaryPart.

The folowing code may not work. If it doesn’t, you can switch it with-

*CFrame.Angles(math.rad(Sword.Model.Handle.CFrame.Rotation.X),math.rad(Sword.Model.Handle.CFrame.Rotation.Y,math.rad(Sword.Model.Handle.CFrame.Rotation.Z)

TweenService:Create(Sword.Model.Handle, TweenInfo.new(1), {CFrame = goto.Position*Sword.Model.Handle.CFrame.Rotation}):Play()
1 Like

It’s the Mouse.Hit.Position, it’s invoked through a RemoteFunction.

A Weld or WeldConstraint only works if the part itself is not anchored. Do not, however, unanchor the PrimaryPart. Once all other objects are unanchored, the PrimaryPart will pull those welded parts into another position.