Kind of a late reply, but here I go.
On your last reply, I saw the error and it clearly says:
Players.KINGK_S.Backpack.Tool.Shield rig.LocalScript: attempt to index nil with 'Humanoid'
Usually if this error happens, that means the one before “Humanoid” is either a nil instance (something that doesn’t exist), or it’s an instance that does not contain a “Humanoid”. Since this Local Script is located in a tool and not in StarterCharacterScripts, it’s no more than a basis that the script runs before even the character of the player is added, so what you could do is to wait for the character:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
Another thing to note is that even if the character has loaded, there is a chance (it may vary, depending on the user’s/player’s connection) that even certain parts of the player’s character have not loaded yet. Quoting the humanoid. Which is why instead of using the dot syntax for finding the humanoid, what you instead could do is:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
Obviously, as you can see from the method’s name itself, “WaitForChild” waits until the humanoid exists. It yields the whole thread, so this will prevent you from running into any whole-script-breaking errors.
Now that we have all that, the next likely thing we would want to do is for the humanoid to play animations. Usually for tools, I’d either just put the animation instance in ReplicatedStorage or ServerStorage. Although, LocalScripts cannot access ServerStorage, which is why it’s best to place it into ReplicatedStorage, or you could bundle it with the tool as well!
local animation = script.Parent.Anim_Name
local animtrack = humanoid:LoadAnimation(animation)
or:
local animation = Instance.new("Animation", character) --You can change character to wherever you want to put the animation instance to.
animation.Name = "WhateverYouWantTONameItHere"
animation.AnimationId = "rbxassetid://animIDhere"
local animtrack = humanoid:LoadAnimation(animation)
Once you have all that set, you can basically call animtrack:Play() to play the animation, and obviously, animtrack:Stop() to stop the animation. You can also keep it on looped by doing this:
animtrack.Looped = true
I’d also like to mention that the LocalScript should instead be parented to the tool instance, and not the tool’s handle.
Also, the method :LoadAnimation does not take animation IDs to play them. Rather, it takes an animation instance instead.
Anyways, I’d also like to give out a tip: If you want to get better at scripting, don’t just look at tutorials! Try to tweak with scripts, find out what they can do, and make your own twists! That’s how I did it. I slowly learn something new everyday. Hope I helped!