Motor6D breaks tool's animations

I’m making a Lightsaber but once I converted the Weld from RightGrip to Motor6D but after that the animation broke, Including the Idle animations: Picture

Any ideas?

1 Like

What code you are using to convert the Weld to a Motor6D?

1 Like
		local Handle = Saber
		local Weld = Instance.new("Motor6D")
		local GetWeld = WeldedPart:WaitForChild("RightGrip")


		if Saber:FindFirstChild("SaberWeld") then
			Saber.SaberWeld:Destroy()
		end

		Weld.Name = "SaberWeld"
		Weld.Part0 = WeldedPart
		Weld.Part1 = Handle
		GetWeld:Destroy()
		Weld.Parent = Handle

you cannot use the .parent function when using instance.new, you must clone it from somewhere in order for it to work.

1 Like

Can you explain why I cannot use the Parent function with Instance.new

it just does not work very well. instead what you can do if you do not wish to clone it is you can do

instance.new("example", game.workspace)

this will set the parent to where you want it to be.

You could get the proper orientation or hardcode the orientation just change the values of the motor:

Weld.Name = "SaberWeld"
Weld.Part0 = WeldedPart
Weld.Part1 = Handle
Weld.C0.Rotation = Vector3.new(-90,0,0) -- Play with this orientation

GetWeld:Destroy()
Weld.Parent = Handle

When you set the motor it comes with default orientation, If you already got this position, Wrap got destroyed and its welded by the motor, then just change orientation properties of the motor:


Code for reference:

local Tool = script.Parent
local Handle = script.Parent:WaitForChild("Handle")

Tool.Equipped:Connect(function()
	local Motor = Instance.new("Motor6D")
	Motor.Part0 = Tool.Parent:FindFirstChild("RightHand")
	Motor.Part1 = Handle
	Motor.Parent = Handle
	Motor.C0.Rotation = Vector3.new(-90,0,0) -- Change orientation
	
	Tool.Parent:FindFirstChild("RightHand"):WaitForChild("RightGrip").Enabled = false
end)

Do not destroy the weld, just disable it. Before doing so first make a Motor6D with the same properties.

1 Like

I know that, but I’m pretty sure that will break one of my animations, an idle animation should do the trick

2 Likes

Oh got it, you already have animations using that tool’s Motor6d? If you change the orientation those animations wont work normally.

Yeah, that will keep the tool in the right position cause its playing with the motor6d. :+1:

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