CFrame Rotation

I am trying to make a script for dual wielding weapons and I need to use welds and CFrames for the left hand item. I looked at multiple posts and support pages and cant get it to work.

I managed to get it to move down to a point low enough in the arm, the issue is when I try and rotate it, the model gets moved over 100 studs away from the arm???

image

Add in some rotation…

image

	local LHand = plr.Character["Left Arm"]
		local Handle2 = plr.Character.Lightsaber.Handle2
		local Weld = Instance.new("ManualWeld", LHand)
		Weld.Part0 = Handle2
		Weld.Part1 = LHand
		Weld.C0 = Handle2.CFrame
		Weld.C1 = LHand.CFrame * CFrame.new(0, -1, 0)
		Weld.C1 = Handle2.CFrame * CFrame.Angles(0, math.rad(90), 0)

Why not use weld constraints? They are much easier to use and normal welds are deprecated.

Tried that and it started moving my character around even with all collisions off. If you can provide a version that works using WeldConstraints Ill happily use that.

Also welds definitely ARENT deprecated. Weld | Documentation - Roblox Creator Hub

It says that there is a newer system in place which don’t require you to set positions manually. You should take a look here and see if you can get weld constraints to work: WeldConstraint | Documentation - Roblox Creator Hub

I did. Like I said, it moved my character around, cant have that happening.

Instead I suggesting using something which gun animators do; Motor6D’ing the players left hand to the lightsaber after which you insert an animation.

You achieve this by making the animation dummy with having 2 Motor6D’s connected to tools (left arm and right arm). After which you just animate the character.

1 Like

How exactly did it move your character around?
Here’s a checklist to make sure you didn’t miss something:

  • Have you set the weapon handle as ‘part1’ and the hand as ‘part0’
  • Have you made the weapon un-cancollide?
  • Have you un-anchored the weapon?

Using normal welds as oppose to weld constraints is a bit tedious in my opinion, i find weld constraints work if you use them properly