How do I make it so when I pull out a tool it plays an idle animation and walk animation?

So, I want to make a game about fighting with weapons. I’m pretty new to scripting so I do not know how to set an a idle and walk animation, so please help me out here.

Pretty sure you could’ve watched a roblox tutorial but that seems too boring so i’ll explain it to you, i create a localscript, i add the variables for the tool’s descendants, etc. I then make the variables of the animations, after that i’ll make an equipped function which is a function of the tool instance then get the character by getting the parent of the tool, i then make the variables that load the animations for all of them, i then play the idle animation, get the character’s humanoid, if he is walking indicate if his speed is over 0 so it won’t play if your on mobile and walk slow, to make them stop i add the unequipped function then make the playing animations stop playing.

If you have any further questions, tell them.

I’m pretty new, so I want to see a youtube tutorial.

you can google one in youtube, it’s pretty late here so i’m lazy, good luck!

Alright, thanks for telling me!