How to animate Tool Handles easily! [OLD POST]

Please send the Motor6D Handler script in a reply please. I want to see if you might have accidently deleted something. If your animation was done correctly, then your Motor6D Handler was not setup correctly. Also please make sure you put the Motor6D Handler INSIDE your tool. It no longer goes in StarterCharacterScripts.

edit sorry I overlooked, you put it inside your tool. I just need to see the script.

1 Like
Tool = script.Parent
MotorCheck = script.MotorCheck
Motor6D = script.Motor6D

Tool.Equipped:Connect(function()
	Motor6D.Part0 = script.Parent.Parent:WaitForChild("Right Arm")
	Motor6D.Part1 = Tool:WaitForChild("Handle")
	if MotorCheck == true then
		Motor6D.Part0 = script.Parent.Parent:WaitForChild("Right Arm")
		Motor6D.Part1 = Tool:WaitForChild("Handle")
	end
	RightArmGrip = script.Parent.Parent["Right Arm"]:WaitForChild("RightGrip")
	wait()
	RightArmGrip:Destroy()

	MotorCheck = true
end)

script.Parent.ChildRemoved:Connect(function()
	Motor6D.Part1 = nil
	Motor6D.Part0 = nil
end)

Tool.Unequipped:Connect(function()
	Motor6D.Part1 = nil
	Motor6D.Part0 = nil
end)

I’ve copy-pasted the script in the solution before to make sure I didn’t accidentally forget to add something, but the result stayed the same. The only idea I have is that the animation itself is at fault, however, apart from Priority and Looping (which I’m absolutely certain I’ve set correctly I’m not certain what could be causing an issue. Should I be looking out for anything in the animation itself that could cause a conflict?

2 Likes

Judging from the fact I use literally the same code you have here probably means that something with the animation could be at fault yes. If you can, and are willing to, can you show me how you have your system setup? I know you sent the script you use to play the animation which shouldn’t cause an issue but if you animated your tool with something other than “Handle” as the name, then the Motor6D is at fault but the explorer shows you have a handle. Please double check the way you animated the system but posting here on what you did exactly would be wonderful.

edit I could have poorly explained something anyways, I plan on completely rewriting this entire tutorial.

2 Likes

Hey, sorry for the rather late reply. It was indeed an error with the animation itself! I’m not entirely certain what went wrong, but I believe the problem was that the model I used to create the animation was welded incorrectly and also in a different way from the tool itself, which is probably why the animation didn’t work correctly on the tool. I’ve replaced the model with a correctly welded one using the guide you’ve linked for multi-part tools and recreated my animation (more or less) and this time everything worked flawlessly.


Thanks a lot for your great help!

Also, I think you’ve explained most parts pretty well, though it did take a couple of reads to grasp as a somewhat beginner to both scripting and animating. I’m mostly baffled that so many steps are required just to be able to animate the Handle, which I assumed would be quite simple at first. I think the guide is still good on its own though, but maybe the solution and original topic post should be condensed so there’s no conflicting information. Still, thanks again and have a nice day/night!

1 Like

I’m glad this helped you! It’s actually a very short task, but I figured I would go into a LOT of depth.

Have a great night as well. If any further issues happen to occur, let me know.

1 Like

Revised + Updated Tutorial!


This tutorial has been completely rewritten a few days ago, I just forgot to post this message here to bump the thread in case others who were confused on this earlier, would hopefully grasp the new tutorial a lot easier than the last.

Have a great day! If there’s any issues, please post here or contact me in Developer Forum PMs.

Hello, not sure if this is just me but I do believe this is a main issue especially with the Motor6DHandler (one provided in this tutorial), every time I equip my tool it seems to be working perfectly and everything is animated just how I wanted, however, the problem occurs when another player joins the game. On my screen my tools are animated perfectly and on the other players the tool is stuck in the middle of my arm… here is a screenshot to see what I mean;

1 Like

I have the same issue, unfortunately it only occurs when a player equips a tool for the very first time. Sometimes after they die it will occur again, and there’s no real way of fixing it. I think it has something to do with the way Roblox replicates Motor6D changes to other players.

This is completely out of my control, unfortunately.

Edit

Adding on to this, another game called Mortem Metallium has this issue as well. The creator uses Motor6Ds to animate his tool handles, and this issue seems to occur on there as well. I’ve seen multiple people have tools stuck in their right arm for seamlessly no reason. I think it might be an engine bug, but since I’m not a regular, I cannot post about it.

Edit 2

I’m currently releasing a fix to the main Motor6D handler to the people who have “RequiresHandle” turned off. If you’re not using a handle, the Motor6D handler will Infinite Yield, so I’m publishing that fix right now. I don’t think you’re using RequiresHandle = false but it’s a fix I intended to publish. :+1:

Edit 3

If you intend to animate tools without using a part called Handle, then please use the Updated Motor6DHandler, which has been published to the main model: Motor6DHandler - Roblox

Thanks for the reply, quite unfortunate that this is an issue. I did attempt a short fix of respawning the players once they load in however that didn’t really work out so I just removed it, It is sad that this bug has been going around for bugs and still not fixed by ROBLOX…

1 Like

The issue gets fixed if the player re-equips their tool. You won’t find any other solution that doesn’t have this bug. It’s just something wrong with Motor6Ds themselves.

What you could do is make a check to see if the player equipped the tool for the very first time, then make them un-equip and re-equip the tool automatically. That way, the animation shows up properly for all peoples screens, with pretty fast equip time.

Or, you could attempt to use the Motor6DHandler Module that I’ve been working on behind the scenes. No documentation yet, but you can look at the source code of the module with the BTRoblox plugin installed to figure out how it works

I don’t intend to Allow Copying until the module is set to my liking. You should be able to require by ID just fine however, or you can put the code in a ModuleScript. Once I actually make the Module a publicly available one, you can switch over to the ID so you can get consistent updates in-case of bugs.

Omg that is really helpful! But… is it possible to add another lightsaber as dual wield? (On both hands)

1 Like

I’ve responded to your DM! The answer will be there.

For anyone else reading, Yes. It just requires 2 Motor6Ds instead of 1. (I don’t mean make 2 Motor6DHandler scripts, I mean add another one to the already existing Motor6D Handler.)

1 Like

I can’t seem to make the animation play at all. Can you help me out?
It plays for the character through the animate script in StarterCharacterScripts, but not for the Tool itself.
No output errors either.
Here’s my script:

Your issue might be because of the fact that the Motor6D handler is a server sided script, and you’re using a Local Script. I don’t understand why people use Local Scripts for animating their tools. I use Server script all the time and I never get any issues out of it.

Try making the switch.

Allright I’ll see if that fixes the issue.

Update: I gave up on making this work. I’ve tried 5 different methods and none of them worked for my custom character so feel free to ignore my posts.

It’s definitely the custom character. The Motor6D should be moving the tool inside the center of the arm if it refuses to animate. Can you send a tree (explorer) of your custom character? Make sure you open every directory so I can see if there’s anything that could be preventing this from working.

One good thing to note, if you have “RequiresHandle” turned off, and you’re using a part named “Handle” the motor6d handler will not attempt to destroy any RightGrip welds. The RightGrip is what prevents Motor6Ds from working. I’ll update the model to print in the console if “RequiresHandle” is true, and if it finds a part named “Handle”.

@IvanDani75

Please update your script. I noticed a mistake I made, and made some fixes for RequiresHandle even further.

1 Like

I was already struggling for several days to make 2 other character’s abilities so I decided to not waste even more development time and just give her a dash ability instead since that’s way easier to do and I already managed to make the other two characters with the help of a friend, but yeah I can test the update still.
It just won’t interrupt the actual development of my game anymore if I play around with it to maybe get it to work.

1 Like

Okay so I just updated the script to latest and the dual wield still not worked on R6 :c is there way to get it worked?

Because

Usually animations performed on Rigs (with Humanoids) are client sided.
They mention it here: