Cant make motor6d work with a tool without handle

hey guys so i want to make motor6d work with a tool without handle

i have tried alot of tutorials but none of them work and i dont really understand how to make it

basically when i equip the tool it doesnt appear in my hands and dissapear in 1 second from my inventory (i do have idle animation in local script)

this is the code that i have right now (server script)

Tool.Equipped:Connect(function()
	local char = script.Parent.Parent
	local M6D = Instance.new("Motor6D", char:FindFirstChild("Right Arm"))
	M6D.Name = "Body"

	char.ChildAdded:Connect(function(child)
		if child:IsA("Tool") and child:FindFirstChild("Body") then
			M6D.Part1 = child.Body
		end
	end)
end)
1 Like

Check if Tool has the RequiresHandle property set to false

it is set to false already, but still it doesnt work, im sure there is totally the problem with the script

Now I see, while creating Motor6D you need to set Part0 property to one of the character’s parts and Part1 property to some part in your tool to weld them together. Also you need to implement something that will prevent creating multiple Motor6Ds from creating when player equips it multiple times

local M6D = Instance.new("Motor6D", char:FindFirstChild("Right Arm"))

its already set to right arm on this line, but im not really sure about so

Nope, in this line you set the parent of Motor6D to character’s right arm and not Part0 property so it’s not welding

2 Likes

``
Tool.Equipped:Connect(function()

local char = script.Parent.Parent
local M6D = Instance.new("Motor6D", char:FindFirstChild("Right Arm"))
M6D.Name = "Body"
M6D.Part0 = char:FindFirstChild("Right Arm")

char.ChildAdded:Connect(function(child)
	if child:IsA("Tool") and child:FindFirstChild("Body") then
		M6D.Part1 = child.Body
	end
end)

end)
``

so i got this and it doesnt work as well

Tool.Equipped:Connect(function()
    local char = Tool.Parent
    local arm = char:FindFirstChild("Right Arm")
    if not arm then return end
    local M6D = Instance.new("Motor6D")
    M6D.Name = "Body"
    M6D.Part0 = arm
    M6D.Part1 = Tool.Body
    M6D.Parent = arm
end)
1 Like

hey well it kinda works now, but why is the position like this?
position

I think its because when you set Part0 (the arm) and Part1 (the tool) it changes Part1’s position to be the same as Part0. The position is the center of the part which is why the gun is in the center of the arm. Maybe try adding a part that sticks out on the end of your character’s arm and set Part0 to that part? I think that will fix the problem of the gun being inside your character’s arm but not the orientation of it.