How to animate tools (the easiest and best way) (for melees)

Every other tutorial on how to animate tools are just a complete pain to follow and just way too complex. So I will be showing you how to do this easily.

Also with this tutorial if you already have tools that are already setup and have their parts welded with a Handle too then you are already good to go.


NOTE: To actually animate I found that Moon Animator works best for animating tools for some reason so I recommend using that.

NOTE 2: I will assume you have good knowledge of developing in general because I don’t want to waste time explaining how to do basic beginner things.


Before we start I recommend getting this plugin Reclass and Tool Grip Editor since it will make things a whole lot easier.


Step 1: Have a your tool setup like this:

Group up all the parts and meshes that makeup you weapon and create a Handle part named Handle, put it under the tool not the model and make it invisible and place it around where your character will be holding the weapon.

Then just weld all the parts including the handle.

Also make sure you use the tool grip editor to align where you want your character to hold the weapon.

Step 2: Create a dummy and put the tool in it.

THIS PART IT CRITICAL, go inside to dummy’s right arm (or right hand if your using r15), find and select “Right Grip” and use the reclass plugin to change it to a Motor6D. Here is a video on how to do this:

Every time you take the tool out and out it back in the dummy, delete the old motor6d and make a new one doing the same thing.

Step 3: Animation!

This is going to be really easy since we don’t have to do much more.

Just create a animation, select the dummy and bam! You will see a bodypart called “Handle” under the right arm (or right hand). That is your tool and you can animate that!

Here is a video of me showing you:

Now once your done export, create a animation instance and put it in the tool.

Step 4: Playing the Animation.

So you don’t have to do anything differently, you can just play the animation like you would with any other animation but you will need to script some things to make it work.

I am assuming you have a server script for your tool so just put this in the script or copy parts of it to make it work (also char is the character so make a variable for that):

local m6d

tool.Equipped:Connect(function()
	local a:Weld = char:FindFirstChild("Right Arm"):WaitForChild("RightGrip")
	m6d = Instance.new("Motor6D")
	m6d.Parent = char:FindFirstChild("Right Arm")
	m6d.Name = "RightGrip"
	m6d.Part0 = a.Part0
	m6d.Part1 = a.Part1
	m6d.C0 = a.C0
	m6d.C1 = a.C1
	a:Destroy()
end)

tool.Unequipped:Connect(function()
	m6d:Destroy()
end)

Now just play your animations and your done! Your weapon animations are now 10x better! Here is my final result:


Hopefully this helped you!

249 Likes

This tutorial is by far the most straight forward one I’ve seen, great use of the Reclass plugin.

9 Likes

Nice! Will the things that we animate the tool apply to our animation, or it’s not gonna work?

3 Likes

couldn’t get it to work on a server script, kept saying failed to attempt to index nil with ‘Destroy’ and when i tried to do it locally both the weld and motor got deleted. Any info on this?

Make sure char is the CharacterModel and make sure to do it on a ServerScript so the animation is visible to everyone.

2 Likes

It’s going the opposite way that I animated the sword to go do you know why?

How it’s supposed to be : https://gyazo.com/cd12f8ceb356b5a10a6c2dae6c815888

Ingame animation : https://gyazo.com/e647dda8afc8f4af1ba161c532722fc0

4 Likes

What exactly does a:Weld mean?

You can specify types in Luau by adding a colon and then the type afterwards.

Example:

local myNumber: number = 0
local myBool: boolean = false
5 Likes

Is this method still valid? I tried making it work (and it did, for a second)
The code worked, the motor6d got replaced with the new one, and my spear got positioned properly with animations working, but after like 2-3 seconds the tool just became nil. There’s nothing destroying the tool, nothing that moves it around. Is this a known issue?

1 Like

I’ve been having a similar issue. I’ve tried following a couple different methods and the same thing has happened, so I’m not sure what’s happening.

1 Like

No this method still works perfectly fine. Show a video or the script and I could maybe fix it for you.

@That0nePixel

1 Like

can i use the default roblox animator to do this?

1 Like

The default animator seems to be iffy about recognizing the tool parented to the rig, but you could probably get it working if you tried.

How would I make a tool holstering system? Like, how would I clone the model and weld it to the lower part of the player’s torso, is that possible with this system? I’m kinda new to this so I don’t know how i’d go about this.

This might work but would be a weird way to do it if you want it to be permanent I’d say just make a clone of the holster and have it be welded on to the player. Welding model to character - #4 by S0MBRX This is a easy way to do so if you just add a couple things. This is also really late but idc.

3 Likes

Thanks for this post. I was confused as to why the “Handle” keyframes in my animations didn’t replicate when I equipped it as an actual player in game. I didn’t know that the “RightGrip” weld only attaches two points together (namely the weapon handle and the arm) without taking into account animation keyframes.

Although:

local a:Weld = char:FindFirstChild("Right Arm"):WaitForChild("Right Grip")

This didn’t work for me. I’m not sure why you did that. Instead, I just referenced them separately using parameters:

tool.Equipped:Connect(function(used, character, animator, rightArm)
	character = script.Parent.Parent
	animator = character:FindFirstChild("Humanoid"):FindFirstChild("Animator")
	rightArm = character:FindFirstChild("Right Arm")
	rightGrip = rightArm:WaitForChild("RightGrip")
        -- etc.
end)

That was what worked for me. Not entirely sure as to why your variable in particular wasn’t working, I am relatively new to scripting, and the only difference I can see is that your “char” is outside of the event handler and mine isn’t.

4 Likes

It didn’t recognise rightGrip on this script either.

There’s a whole host of reasons why that would be the case. This method/script is working. But without further context and details with regard to how you personally tried to implement it, I can’t help you.

It was actually a dumb mistake, I was using R15, so I had to change “Right Arm” to “RightHand”

if you spend time animating the actual sword and then you have some other swords with different names, will they also be animated? i used a different method of achieving the animating of the tools but the only issue is, i have to reanimate every single tool in the game. got any solutions?