Using the TweenService to rotate part's CFrame, doesn't rotate it's child

Hello forum,
I have a canon model, I’m trying to rotate.
image
Here you can see the structure, MeshPart is the PrimaryPart (the model) and Pos is just a cube where projectiles should spawn. Now I rotate the MeshPart with

local xRotateTween = TweenService:Create(self.Instance.PrimaryPart, TweenInfo.new(0), { 
	CFrame = CFrame.lookAt(self.Instance.PrimaryPart.Position, Vector3.new(
		player.Character.HumanoidRootPart.Position.X,
		self.Instance.PrimaryPart.Position.Y,
		player.Character.HumanoidRootPart.Position.Z
	))
})
	
xRotateTween:Play()

This works really well with rotating the canon to the player but for some reason the Pos doesn’t get rotated with the MeshPart. How could I make it rotate with the MeshPart using the code above? I’ve also tried using Welds but either I use them wrongly or they also don’t work. (If possible, I wouldn’t like to create second tween for the Pos rotation). If you need any more info, let me know.

Try unanchoring the “Pos” part and use a WeldConstraint to weld it to the MeshPart.

Like so?
image
image
Works, thanks :smile:

1 Like