Tool animation not working

I have a place which overrides my default load animation, I made the animation which the tool connected to the right arm as a Motor6D. When The Equip runs I’d connect the M6D thru a remote event and Break the M6D when the tool gets unequipped,

The Server script could look something like this

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEventsFolder = ReplicatedStorage:WaitForChild("RemoteEvents")
local Init_M6D = RemoteEventsFolder:WaitForChild("Init_M6D")
local Destroy_M6D = RemoteEventsFolder:WaitForChild("Destroy_M6D")

local function Init(player)
	
	local char = player.Character
	local a = char:FindFirstChild("Right Arm"):WaitForChild("RightGrip")
	local m6d = Instance.new("Motor6D")
	m6d.Parent = char:FindFirstChild("Right Arm")
	m6d.Name = "RightGrip"
	m6d.Part0 = a.Part0
	m6d.Part1 = a.Part1
	m6d.C0 = a.C0
	m6d.C1 = a.C1
	a:Destroy()
	return m6d
	
end

Init_M6D.OnServerInvoke = Init

Destroy_M6D.OnServerEvent:Connect(function(player, M6D)
	
	M6D:Destroy()
	
end)

And the client could look somthing like this

--Init
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEventsFolder = ReplicatedStorage:WaitForChild("RemoteEvents")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Animator  = Character:WaitForChild("Humanoid"):WaitForChild("Animator")
local Tool = script.Parent
local Equip_1 = script:WaitForChild("Equip_1")
local Equip_2 = script:WaitForChild("Equip_2")
local Slash_1 = script:WaitForChild("Slash_1")
Equip_1 = Animator:LoadAnimation(Equip_1)
Equip_2 = Animator:LoadAnimation(Equip_2)
Slash_1 = Animator:LoadAnimation(Slash_1)
local Init_M6D = RemoteEventsFolder:WaitForChild("Init_M6D")
local Destroy_M6D = RemoteEventsFolder:WaitForChild("Destroy_M6D")
local M6D

--Main?

Tool.Equipped:Connect(function(mouse)
	
	M6D = Init_M6D:InvokeServer()
	Equip_1:Play()
	Equip_2:Play()
end)

Tool.Unequipped:Connect(function(mouse)
	
	Equip_2:Stop()
	Destroy_M6D:FireServer(M6D)
	
end)

Tool.Activated:Connect(function()
	Slash_1:Play()
end)

If it still does not work, There might be something wrong with your animation, I suggest following this tutorial: How to animate tools (the easiest and best way) (for melees)

1 Like