local plr = game.Players.LocalPlayer
local tool = script.Parent
local char = tool.Parent:IsA("Model") and tool.Parent or tool.Parent:IsA("Backpack") and plr.Character
local hum = char:WaitForChild("Humanoid")
local animator = hum:WaitForChild("Animator")
local anim2 = Instance.new("Animation")
anim2.AnimationId = "rbxassetid://6382914177"
local track2 = animator:LoadAnimation(anim2)
script.Parent.Equipped:Connect(function()
track2:Play()
end)
script.Parent.Unequipped:Connect(function()
track2:Stop()
end)
If you want me to explain everything, just say so!
local Tool = script.Parent
local anim2 = Instance.new("Animation")
anim2.AnimationId = "rbxassetid://6382914177"
Tool.Equipped:Connect(function()
local Character = Tool.Parent
anim2.Parent = Character
local track2 = Character.Humanoid:LoadAnimation(anim2)
track2:Play()
Tool.Unequipped:Connect(function()
track2:Stop()
end)
end)