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!