How to animate Tool Handles easily! [OLD POST]

Ok, thanks! Was really helpful.

1 Like

No problem! Should anymore issues occur, I’ll be here!

2 Likes

I’ve tried to make a game with a weapon menu GUI. The problem is, I put the weapons in ReplicatedStorage so something in the scripts don’t work and the animations don’t play. Can you help me? Might be the Motor6DHandler, but I’m not sure.

Depends on where you have put the Motor6DHandler. Did you keep it in StarterCharacterScripts? Or did you move it into the GUI? If so, it HAS to be in the StarterCharacterScripts because all it does is wait until you equip it, and once you do, it’ll allow the handle to be animated. There is no reason to move the location of it.

3 Likes

Didn’t move the Motor6DHandler. Everything is where it’s supposed to be, besides the weapons that are in ReplicatedStorage.

Is this a Tool like normal? Or just a model? Is it added straight onto the character, or do you have to manually equip the tool?

edit I have to sleep now, I will attempt to assist more tomorrow! Thanks!

3 Likes

Go sleep if you need to. The thing I did was basically moving the tool from StarterPack to ReplicatedStorage.

2 Likes

Hello, sorry for reviving this topic but I have a problem: it looks like the equip and activate tool animations are not playing, only the idle one. What should I do?

1 Like

Did you make sure you have the animations set to “Action” inside the animation editor? If you don’t have the animation set to “Action” the animation will refuse to play.

Tools can only use “Action” from my understanding. (or at least my experience with them, which has never been an issue)

Make sure Idle, Equip, Activate, etc… all set to “Action” for their animation type

2 Likes

What is this suppose to look like in StarterPack? You completely just skipped the steps of the actual tool and only showed us how to set it up for animation, but what about the actual tool and not the model?

1 Like

It doesn’t matter where you place the tool. The new Motor6DHandler I included in the solution provides a fix so you can just drop the script in the tool and it will automatically set the Motor6D to the handle of that tool, and your Right Arm / RightHand

I will show you an example. I thought this was straight forward and I left it out.

image

Make sure that if your placing it anywhere that’s not StarterPack, that you make a script that will move the tool from that specific location to your Backpack*

2 Likes

Hey, how would I motor6d/weld the object if there’s more than one?
image

1 Like

If you don’t plan on animating those other parts on a knife, assuming from the fact it says “blade”, simply insert a Motor6D in that “Animate” model and then go in the properties of that Motor6D and set the Part0 to the Right Arm, and the Part1 to the Handle of the blade, as seen with your highlighted area.

Now, you will need to weld each of those extras parts to the Handle. That way, when you animate, they all move together with the handle.

2 Likes

Unfortunately, this doesn’t seem to be working correctly for me. Although it fixed the Handle being stuck in the grip of the hand, it still teleports the Handle into the Right Arm for some reason, despite the fix you have put in the solution.


script.Parent.Equipped:Connect(function()
	idleTrack = script.Parent.Parent.Humanoid:WaitForChild("Animator"):LoadAnimation(script.Parent.swordIdle)

	idleTrack:Play()
end)

script.Parent.Unequipped:Connect(function()
	idleTrack:Stop()
end)

Any idea what might be causing this? The idle animation I made already has the Action priority and is being looped, so I have no idea what might be causing it. For reference, this is what it’s supposed to look like:


I’d appreciate any ideas or help I could get!

1 Like

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.