Giving tools custom walk animations

  1. What do you want to achieve? Keep it simple and clear!
    I want my tool to play a custom animation when walking, but all the other animations are supposed to stay the same.
  2. What is the issue? Include screenshots / videos if possible!
    When I tried it it either just didn’t work or always played the walking animation, even when I’m jumping, idling, etc.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried looking on the DevForum, YouTube, even asked some friends that know coding better than me.

I have no idea how to get this to work. I also tried overwriting the walk and run animations in the Animate script, but there’s this thing where your hand and torso already have prewritten positions, and I don’t know how to get rid of those.

If anyone could help me get rid of those preset animations that don’t let you move the torso or the right arm when holding a tool or help me achieve what I explained above in any other way I’d really appreciate it.
Honestly if anyone could just help me remove the torso from being stiff when holding a tool, so only the right arm has that holding animation thingy, it’d already be enough.

Well, firstly you should have your animations for your tools (Make sure your animations are set on their right priority). In your case of making a walk animation you must set the animation to Movement

With the help of a local script you should be able to make it work:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")

local Tool = script.Parent
local WalkAnimation = --Get your Animation

if Humanoid.MoveDirection.Magnitude > 0 and Character:FindFirstChild(Tool) then
      WalkAnimation:Play()
elseif Humanoid.MoveDirection.Magnitude <= 0 then
  WalkAnimation:Stop()
end

Note: This is something I wrote up real quick haven’t tested it since I’m kinda busy

I mean this does play the desired animation, it’s just that this tool holding animation is still overwriting it.
So like the torso is still stiff and the right arm is still like streched, and the thing is that the animation only changes the arm, because basically all I wanna do is that the torso isn’t stiff.
So like it basically doesn’t change anything because other than those the animation isn’t any different.
I also adjusted the code a little because it was spamming errors:

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Animator = Humanoid:WaitForChild("Animator")

local Tool = script.Parent
local WalkAnimation = Humanoid:LoadAnimation(script.anim)
WalkAnimation.Priority = Enum.AnimationPriority.Action
WalkAnimation.Looped = true
if Humanoid.MoveDirection.Magnitude > 0 and Character:FindFirstChild(Tool.Name) then
	WalkAnimation:Play()
elseif Humanoid.MoveDirection.Magnitude <= 0 then
	WalkAnimation:Stop()
end

Any ideas how I could overwrite that?

You would need to remove the tool animation inside of the Animate script. Remove the object inside of the script and remove any instances inside of the script you can just use ctrl + F to find it

I suck at explaining my bad

local animNames = { 
	idle = 	{	
				{ id = "http://www.roblox.com/asset/?id=119125392207313", weight = 9 },
			},
	walk = 	{ 	
				{ id = "http://www.roblox.com/asset/?id=104836818821623", weight = 10 } 
			}, 
	run = 	{
				{ id = "run.xml", weight = 10 } 
			}, 
	jump = 	{
				{ id = "http://www.roblox.com/asset/?id=125750702", weight = 10 } 
			}, 
	fall = 	{
				{ id = "http://www.roblox.com/asset/?id=180436148", weight = 10 } 
			}, 
	climb = {
				{ id = "http://www.roblox.com/asset/?id=180436334", weight = 10 } 
			}, 
	sit = 	{
				{ id = "http://www.roblox.com/asset/?id=178130996", weight = 10 } 
			},	
	toolnone = {
				{ id = "http://www.roblox.com/asset/?id=182393478", weight = 10 } 
			},
	toolslash = {
				{ id = "http://www.roblox.com/asset/?id=129967390", weight = 10 } 
--				{ id = "slash.xml", weight = 10 } 
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 } 
			},
	wave = {
				{ id = "http://www.roblox.com/asset/?id=128777973", weight = 10 } 
			},
	point = {
				{ id = "http://www.roblox.com/asset/?id=128853357", weight = 10 } 
			},
	dance1 = {
				{ id = "http://www.roblox.com/asset/?id=182435998", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491037", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491065", weight = 10 } 
			},
	dance2 = {
				{ id = "http://www.roblox.com/asset/?id=182436842", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491248", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491277", weight = 10 } 
			},
	dance3 = {
				{ id = "http://www.roblox.com/asset/?id=182436935", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491368", weight = 10 }, 
				{ id = "http://www.roblox.com/asset/?id=182491423", weight = 10 } 
			},
	laugh = {
				{ id = "http://www.roblox.com/asset/?id=129423131", weight = 10 } 
			},
	cheer = {
				{ id = "http://www.roblox.com/asset/?id=129423030", weight = 10 } 
			},
}

Remove toolnone (Source: Trust me)

But when I remove it it only spams errors

Yeah sorry I forgot to mention this don’t just delete the row try to find any related instances that match tool none and delete them as well

That somewhat worked, but I still had some problems like the animation still playing when you equipped it while running and then stopped running without unequipping, sometimes it just froze, etc. However I do believe that others having the same problem would find your explaination more useful, so I’ll mark it as solution.
How I solved it is I basically loaded to default toolnone animation and removed the torso part, that way it only changed the arm and kept my normal walk animation. That was perfect for me because the animation I was trying to get while holding a tool was exactly my walk animation just with the arm stretched. I did that because with the torso stiff too my animation looked really weird.
Anyway thanks for the help!

You’re welcome. I’ve actually worked this issue out before by doing what I suggested so this might have been an issue on your end pal :slight_smile:

Yeah idk I usually am a little stupid with solutions on the devforum. I figured that simply overwriting the default toolnone animation was easier for me.