when i equip my weapon as you can see it doesnt go directly in the hand but starts in the arm first. how do i fix this?
serverscript:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local M6D = Instance.new("Motor6D", char:FindFirstChild("Right Arm")) -- or the part that you have decieded
M6D.Name = "ToolGrip"
char.ChildAdded:Connect(function(child)
if child:IsA("Tool") and child:FindFirstChild("BodyAttach") then
M6D.Part1 = child.BodyAttach
M6D.Part0 = char:FindFirstChild("Right Arm")
end
end)
end)
end)
local script:
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local load = char:WaitForChild("Humanoid"):LoadAnimation(script.idle)
char.ChildAdded:Connect(function(child)
if child:IsA("Tool") and child:FindFirstChild("BodyAttach") then
char:FindFirstChild("Right Arm").ToolGrip.Part1 = child.BodyAttach
end
end)
script.Parent.Equipped:Connect(function()
load:Play()
end)
script.Parent.Unequipped:Connect(function()
load:Stop()
end)