So I typed this script with Animator:
local Tool = script.Parent local Animation = Tool:WaitForChild("Animation") local Animator = Instance.new("Animator") Animator.Parent = Animation local AnimationTrack Tool.Equipped:Connect(function() local Character = Tool.Parent local Humanoid = Character.Humanoid AnimationTrack = Humanoid:WaitForChild("Animator"):LoadAnimation(Animation) AnimationTrack:Play() end) Tool.Unequipped:Connect(function() AnimationTrack:Stop() end)
But It doesn't work, I suck at using animator (Because Im new to It) and doesn't know what to do
You don't have to create a new animator, humanoid already has an animator when it first adds
local Tool = script.Parent local Animation = Tool:WaitForChild("Animation") local Animator Animator.Parent = Animation local AnimationTrack Tool.Equipped:Connect(function() local Character = Tool.Parent local Humanoid = Character.Humanoid Animator = Humanoid.Animator -- Get Animator instance AnimationTrack = Humanoid:WaitForChild("Animator"):LoadAnimation(Animation) AnimationTrack:Play() end) Tool.Unequipped:Connect(function() AnimationTrack:Stop() end)