Motor6D causing character to flop

I welded a sword to a character as soon as they spawn, but the motor6D keeps causing the character to fall over as soon as they spawn, I know what’s causing this, I just don’t know how I would come by fix it…

Image of the problem:
imagen

Reason why I couldn’t upload a video is because my internet’s not doing great right now, everytime I tried to upload a video, it failed.

This is the script I’m using

plr_ser.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(chr)
		local right_arm = chr:WaitForChild("Right Arm")
		local sword = rep_ser.WeaponModels.Longsword.Handle:Clone()
		sword.Parent = chr
		sword:PivotTo(right_arm.CFrame)
		local motor6d = Instance.new("Motor6D")
		motor6d.Part0 = right_arm
		motor6d.Part1 = sword
		motor6d.C0 = CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-90),0,0)
		motor6d.C1 = CFrame.new(0, -2, 0)
		motor6d.Parent = right_arm
		sword:PivotTo(sword.CFrame * rotation)
	end)
end)
1 Like

Is the sword Can-Collide and Massless?

Both of those are set to false

This was bad wording, it’s not cancollide and it is massless

whats causing it? im having the same problem

Change these parts

  1. Positioning the sword relative to the arm before attaching it with Motor6D:

    sword.CFrame = right_arm.CFrame * CFrame.new(0, -1, 0)
    
  2. Adjusting C1 to ensure proper alignment:

    motor6d.C1 = CFrame.new(0, 0, 0)
    
  3. Ensuring the sword’s orientation is correct after being attached to the character:

    sword.CFrame = right_arm.CFrame * CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(-90), 0, 0)
    
1 Like

Welding is weird, created a hitbox myself with CanCollide to false yet with a weld it Collides when it moves fast.

This worked great! Thank you so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.