Heyo, the name is Sio_Fi. I’ve been making posts on the forum ever since about 2 years ago (2020). The Motor6DHandler tutorial I provided then was the first ever tutorial I ever released on the forum that had pretty good feedback, and a lot of people who helped me make it what it was meant to be.
I’m glad it was able to help about 800+ (at the time of making this post) people who put the script into their games to animate their tools. I wasn’t expecting that number alone, and it still shocks me that it continues to grow.
I’m back once again, providing a better upgrade to the good ol’ Motor6DHandler script, Tool 6D!
Regardless, here is a link to the previous post for those who need it for some reason:
Prologue: What is Tool 6D?
Chapter 1: Setup your Animation Rig w/ Motor6D(s)
Chapter 2: Preparing Tool for Tool 6D
Chapter 3: Setting up Tool 6D
Epilogue (p.1): Testing the Setup
Epilogue (p.2): Conclusion
So you’re probably wondering what Tool 6D even is, and what it’s used for. I’m here to answer those questions, but I need to explain what it once was.
In my previous tutorial that I linked above, I was providing support to users who were trying to animate tools that make big use of Handles. In that tutorial I showed how to setup the basic functionality, and get it functioning.
The post explained quite thoroughly how to setup a rig, and how to get that animation working on a Player in-game.
It had one major flaw, which I actually mentioned in the previous post, but didn’t explain how to do: The script didn’t naturally support the usage of more than one BasePart & Motor6D!
This meant that if your Tool had multiple parts that you wanted animated, the only one you would have had covered is the main Handle of your tool, and absolutely nothing else. I provided an example of what my finished result looked like at the end of the tutorial that showed my character using 2 gloves that were animated with this exact more-than-one Motor6D setup.
Tool 6D offers this lack of functionality, plus cleaner code, and less redundant methods of doing things!
I attached a Tutorial on the previous post about setting this up, which I still recommend the average user to follow since it’s more in-depth, but for the sake of a fully explained tutorial, I’ll quickly go through the setup.
If you’re already familiar with animating Motor6Ds (I’m just assuming the average person is not), you can likely skip this step because you’ll likely already know what I’m going to show.
Create a new Dummy based on whatever type of animation you intend on making (Whether that being R6, or R15, this will work with both)
You can do so by navigating to the
Avatar tab sitting on the top of the Studio window:
The reason why we need to go here is due to a recent studio overhaul. Roblox relocated the
Animation Editor plugin and the
Rig Builder plugin to this very tab.
To start, click on the
Rig Builder option listed in the Ribbon bar:
Open doing so, you’ll be greeted with this window, which you can select an option from, in the viewport. Select the one you’d like. For me, I’m going to choose R6 for the sake of simplicity.
I personally like to go for the Block Rig, but you can choose others depending on your use case:
At this point, you might have something that looks like this. A basic colorless Dummy, with nothing else much to it. That will change:
We’ll need to create an object for them to hold, so for the sake of simplicity, I’m going to use the classic LinkSword. Go ahead and place it within general range of it. (not required, just so you know it’s there, and can keep tabs on it)
At this point, it should roughly look like this:
Now, we’re ready to begin creating a Motor6D to link the Dummy with the Tool (In this case, it’s the sword. For you, it may be something different!)
In order to do this, we need to use the Explorer in Roblox Studio, usually found on the right side of Roblox Studio. If you repositioned the windows around studio it may be located elsewhere, but just locate the Explorer.
Once you do, you’ll see something like this. If your game has a lot more content in it, just search for the Dummy, and the Sword. You can group these both together to make locating it easier:
You’ll want to drag your Tools handle (In my case, the sword), into the Dummy’s Character model, as shown in the video below:
(Keep in mind, it may be safer to create a copy of your Tools Handle to use specifically for the Animation Rig, and one for your Tool. That way you can separate the two safely.)
After you’ve done this, you’ll need to create a Motor6D to put inside the Character Model.
To do this, click on the Dummy in the Explorer, and while hovering your mouse over it’s name, you’ll see a + icon next to it.
Clicking the + should cause a menu to pop up. When it does, simply search “Motor6D”, then hit Enter.
If you’re confused, refer to the video below:
Once that is done, click on the newly created Motor6D, then locate the Properties window just like you did when finding the Explorer window.
*You’ll need to set the Part0 to the Body Part you want, and set the Part1 to the Handle of your Tool (In this case, it’s the sword for me).
If you’re confused on this step, refer to the video below:
After you’ve done this, you’ll see the Dummy change in your viewport to something that looks like this. If you see this, you’ve done everything correctly:
If nothing changes, make sure the character is fully unanchored. You can select the model and anchor/unanchor it to make sure the Handle of your tool, and the Body Parts are all unanchored.
Now, just like the previous tutorial, I assume you know how to animate. I’m going to skip the animation step, but the Animation Editor should now be able to animate the Handle part with keyframes like it wasn’t able to before.
Below is an example of it working in action.
You’ll need to make an Idle animation for your Tool, or else the Handle will return to the default Motor6D position (refer to the previous image of my Dummy being impaled by a sword in his arm)
Make sure you set Animation priorities properly. (Idle Animation is Action, and for things like swinging a sword, Action2, or higher.) The reason you should do this is to compensate for the recent
WeightedAnimationBlendFixchange which has been forced on for all experiences.
Now that you have all your Animations prepared (Idle animation, and any other animation as needed), you’ll need to setup the Tool for usage.
Before we begin, I should remind you that some scripting experience is greatly recommended. I’m here to provide a way to animate tool handles, but not teach anyone how to script. With that out of the way, let’s begin.
It’s very important that when you create your Tool, that you toggle off RequiresHandle. You’ll never need it on if you’re using Motor6Ds anyway, and for some reason it prevents Tool 6D from working at all, so make sure it’s toggled off. You can do so by following the example video below:
Next up, you’ll need to make a Script that you can use to play the Idle animation, as well as other animations. For me, I did what you’d typically do for a basic sword, and made it use the Idle animation, and a basic Slash animation.
Here’s my mock-up of a LoadAnimation script that you can follow (May not work exactly to your use-case, but adjust accordingly.)
Script that I used for my Basic Sword to play Animations
-- [ Services ] -- local PlayerService = game:GetService("Players") -- [ Variables ] -- local Tool = script.Parent local db: boolean = false -- // Animations local Animations = Tool:WaitForChild("Animations") local Source_Sword_Idle: Animation = Animations:WaitForChild("Idle") local Source_Slash_Anim: Animation = Animations:WaitForChild("Slash") local Sword_Idle: AnimationTrack = nil local Slash_Anim: AnimationTrack = nil -- [ Functions ] -- -- This function will setup Animations when the Player equips the tool -- local function Sword_Equipped() local Player: Player = PlayerService:GetPlayerFromCharacter(script.Parent.Parent) local Character: Model = Player.Character local Humanoid: Humanoid = Character:WaitForChild("Humanoid") local Animator: Animator = Humanoid:WaitForChild("Animator") Sword_Idle = Animator:LoadAnimation(Source_Sword_Idle) Slash_Anim = Animator:LoadAnimation(Source_Slash_Anim) Sword_Idle:Play() end local function Sword_Unequipped() Slash_Anim:Stop() Sword_Idle:Stop() end -- This function will perform a very simple sword slash animation -- local function Sword_Activated() if not db then db = true Slash_Anim:Play() task.wait(1) db = false end end -- [ Connect Functions ] -- Tool.Activated:Connect(Sword_Activated) Tool.Equipped:Connect(Sword_Equipped) Tool.Unequipped:Connect(Sword_Unequipped)
Also, here is the Explorer so some of the variables make a bit more sense as to where they’re located:
Once you’ve setup your Animation script, you can move onto the next Chapter. If you already had one ready, you can skip all of the previously mentioned things in this Chapter.
You’ve almost made it past all the complicated setup, so congratulations! I’ll try to explain this segment a bit, because it does require opening up a script, and editing some values.
First, you’ll need to obtain a copy of Tool 6D. Luckily for you, I have conveniently attached the model here for you to obtain it from.
| Tool 6D: GET IT HERE!
Next, insert the script into your game by searching for the script in your owned models. After you’ve done that, click and drag the script into the Root of your tool.
Here is a video of that being done:
Once you’ve installed it, go ahead and double click on the script to open it up. When you open up the script, it may look a little bit intimidating at first, but don’t worry, as I’ll explain it to the best of my ability.
You should see something similar to this when you first open it up:
Now, scroll down a bit until you see a variable labeled
Configuration. This segment of the script is the only one you need to edit, as the rest of the script reads over the configuration, and does the rest for you
Anyways, here is where you should be focusing your attention:
Here is where that part that I mentioned from the Prologue of this post comes in, you may have noticed that there is a numbered array, that holds information regarding a
Tool_Part and a
Body_Part for each number listed:
This allows you to setup more than 1 Motor6D. The default is one, but you can duplicate this table, and up the number by 1 if you’d like to animate more than just a single part within your Tool.
To visualize what that may look like, here is an video, as well as an image:
| Keep in mind you can set numerous Motor6Ds to the same body parts, so if you need to set multiple Motor6Ds to the same
Body_Part value, don’t be afraid to do so!
Just to keep things simple though, I’ll just stick with the first table, and not add another one.
Most developers likely call their Tool handles “Handle”, so the default is Handle, and for R6 players, the default
Body_Part is Right Arm, since tools use that by default on the R6 rig.
If you’re using R6, and have a part named Handle inside your tool, you won’t need to change anything here. Otherwise, simply rename these two things to what applies to you. If you’re using R15, you’ll need to rename “Right Arm” to “RightHand”. As mentioned before, if your tools handle is called “Handle”, you won’t need to change a thing for
In my case though, my Handle was called “Sword”, so I’ll simply change
Tool_Part to that, and since I’m using R6, I’ll keep it set to “Right Arm” on the
Here’s what I got after reviewing my changes:
| Keep in mind that since Tools typically use the Arms / Hands, I say to set them to that, but if your tool requires setting Motor6Ds to other body parts such as legs, or the head, you’ll need to have made separate animations for those, and set the
Body_Part value to accurately reflect that.
As always, feel free to direct message me if this segment was still a bit confusing to you.
Once you setup the configuration, the script will read over the configuration, locate the
Tool_Part you specified, and connect it to the
Body_Part you inputted with a Motor6D.
After you’re done with inputting as many Motor6Ds that you need (or if not, and you just stuck with the first table that I showed you and edited that one), you’re pretty much finished with this chapter!
Here comes the fun part! Finally! You can now take a break, and look at the Animation you worked hard on earlier, with this very simplistic change! (not technically of course)
Here is a clip with the sword I finished, and used this script with, including the LoadAnimation script I attached previously in the tutorial.
That concludes this tutorial pretty much. I hope you make great things with this, and once you keep doing this, it’ll basically become second nature to your skillset!
Please contact me through my Developer Forum profile if you need help with anything listed here. It may help a bit more if you tell me which Chapter you’re confused on, that way I can go over that segment with you.
Please also keep in mind that this post is brand new, and just like the old post, I likely forgot to include an important step, or mention something. Writing all these words have probably driven me mad (not really, but it’s a lot), so go easy on me!
Is something not working right? Do you feel like you followed the tutorial to the core but it’s just not working? Please take a look at the Studio console (or in-game console) to figure out if there are any errors, or likewise.
Well, this script was made for people who wish to use melees which happen to possibly involve usage of other separate handles and body parts. It was never thought to be useful with guns, as that was out of the scope of this in resource, at least in my eyes, and for old times sake.
Animating guns with moving parts may not be possible, however you can animate the guns grip with this. I haven’t tested with making a gun, so if it works out, be sure to share how you did it!
If you happen to find other things this doesn’t work with, be sure to let me know here, and I’ll edit this post after testing your findings.
(p.s) Thanks to all those in the past that helped me accomplish my goals, and helped me with finding out what the old Motor6DHandler wasn’t capable of doing, including supporting me up until this point. I wouldn’t have gone through the trouble of putting all this together with my very small brain.
Know you matter, and that’s all for me
Have a great day/night, and until next time!