Tool Parts not moving with arms (R6) please help

I am trying to make the arms move with arms (looking at mouse position)

but this happen:

The animation I use for this tools is:

This is the script I am using for move arms.

Local script:

local run = game:GetService("RunService")

run.RenderStepped:Connect(function()

		if equipped then
			local rightX, rightY, rightZ = char.Torso["Right Shoulder"].C0:ToEulerAnglesYXZ()
			char.Torso["Right Shoulder"].C0 = (char.Torso["Right Shoulder"].C0 * CFrame.Angles(0, 0, -rightZ)) * CFrame.Angles(0, 0, math.asin((mouse.Hit.p - mouse.Origin.p).unit.y))

			local leftX, leftY, leftZ = char.Torso["Left Shoulder"].C0:ToEulerAnglesYXZ()
			char.Torso["Left Shoulder"].C0 = (char.Torso["Left Shoulder"].C0 * CFrame.Angles(0, 0, -leftZ)) * CFrame.Angles(0, 0, math.asin((-mouse.Hit.p - -mouse.Origin.p).unit.y))
		end
	end)

I dont know if is because the animations I am using but I dont think is because of that.

The animations system are basic

*Server Side*

game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)
		local M6D = Instance.new("Motor6D")
		M6D.Name = "ToolGrip"
		M6D.Parent = char.Torso
	end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)
	local char = plr.Character
	char.Torso:FindFirstChild("ToolGrip").Part0 = char.Torso
	char.Torso:FindFirstChild("ToolGrip").Part1 = location
end)

game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
	plr.Character.Torso:FindFirstChild("ToolGrip").Part0 = nil
	plr.Character.Torso:FindFirstChild("ToolGrip").Part1 = nil
end)





*Local Script*

tool.Equipped:Connect(function()
	----Animations----
	local char = plr.Character or plr.CharacterAdded:Wait()

	game.ReplicatedStorage.ConnectM6D:FireServer(tool.ToolsParts.BodyAttach)

	char.Torso.ToolGrip.Part0 = char.Torso
	char.Torso.ToolGrip.Part1 = tool.ToolsParts.BodyAttach

	local Humanoid = char:FindFirstChild("Humanoid")  
	idle = Humanoid:LoadAnimation(script:WaitForChild("Idle"))

    idle:Play()
end)

This is how the tool looks like:

image

this might help

1 Like

as i can see, you parented to character Torso, try to parenting to RightHand or LeftHand, because since that thing is attached to your torso, if you move your torso, the minigun will move, [in this case, moving the arms will not animate the minigun]

[correct me if i said something wrong]

char.Torso:FindFirstChild("ToolGrip").Part0 = char.Torso -- Change Torso to RightHand of the humanoid
--and do that with the rest 
	char.Torso:FindFirstChild("ToolGrip").Part1 = location
1 Like

I mean I dont think that can help because I am not using “Handle”

the rest is other Motor6D for every arm?


this is what happen

Try this: (changed  torsos) 
game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)
		local M6D = Instance.new("Motor6D")
		M6D.Name = "ToolGrip"
		M6D.Parent = char.RightHand
	end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)
	local char = plr.Character
	char.RightHand:FindFirstChild("ToolGrip").Part0 = char.RightHand
	char.RightHand:FindFirstChild("ToolGrip").Part1 = location
end)

game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
	plr.Character.RightHand:FindFirstChild("ToolGrip").Part0 = nil
	plr.Character.RightHand:FindFirstChild("ToolGrip").Part1 = nil
end)





*Local Script*

tool.Equipped:Connect(function()
	----Animations----
	local char = plr.Character or plr.CharacterAdded:Wait()

	game.ReplicatedStorage.ConnectM6D:FireServer(tool.ToolsParts.BodyAttach)

	char.RightHand.ToolGrip.Part0 = char.RightHand
	char.RightHand.ToolGrip.Part1 = tool.ToolsParts.BodyAttach

	local Humanoid = char:FindFirstChild("Humanoid")  
	idle = Humanoid:LoadAnimation(script:WaitForChild("Idle"))

    idle:Play()
end)
1 Like

You have to use rigid constraints to connect the minigun to the player.

1 Like

It works but…

from the bodyAttach to the arm?

you will need to animate the minigun again, btw

Oh ok thank you let me just test it.

It works just fine… I think in something about weld with arms but I didnt tried but now I see it works very fine thank you. :slight_smile:

1 Like