How to animate Tool Parts (Guns, Knifes etc.)

Hello everybody! I’m Headstackk, I’ve been creating and making firearm weapons on Roblox for a while. I’ve also created the game Weaponry. In this post, I will briefly explain how to get started to animate a weapon on Roblox.

I have already briefly explain how on this DevForum post, but I’d like to make a new post to clarify everything and explain it step by step.

In most of the Roblox Shooter games (Excluding advanced shooter games such as Phantom Forces), I observed that they usually make a really simple animation, not even detached magazine, or a moving bolt. In this tutorial, I’m going to show you how to animate those details.

In the end of this tutorial, you should be able to create something like this:

Let’s get started.

1: Create an animating Dummy:

2: Group your gun model, and put it inside the dummy. Your gun model should be parented to the Dummy.

3: Create a new part, name it BodyAttach and place it at wherever you want to, I recommend you to put it near the Gun Handle.
Do Not name the part as Handle.

4: Connect all the parts of your guns to BodyAttach with Motor6D.
Before we proceed, you have to install this [plugin].(Constraint Editor - Roblox)
It’s a must have plugin when it comes to Motor6Ds and Weld.

After installing it, you will need it to connect all the parts.
Please be sure that all the parts are unanchored and there are no welds.

First, select the BodyAttach part first, then select the parts that you want them to be animated.
Such as a weapon’s magazine, a weapon’s bolt.
After selecting the parts, click “New Motor6D” in the plugin tab.

Image from Gyazo

Then for the rest of the parts that you are NOT going to animate, do the same step but click “New weld” this time.
Image from Gyazo
And that’s it! You connect all the parts in your gun with Motor6D, they will now stick together.
But before animating, we have to stick the Motor6D to the Animating Dummy!

5: Connecting the dummy to the gun:
For this step, we do not need to use the plugin. Instead, manually create a new Motor6D, you can create one by typing the command in the output bar:
image
Make sure that the Command Bar is on.
image

Then, put the Motor6D into the Dummy’s Torso.

After that, Connect the Motor6D’s Part0 as the dummy’s Torso, and connect it’s Part1 to the BodyAttach of your gun. Make sure your gun is NOT ANCHORED when doing this!
image

Last but not least, WOAH! You will realize your gun moved. Don’t worry, that’s an expected behavior. DO NOT move or rotate your gun after this step, or else the Motor6D will be disconnected!

image

6: Finally! You can start animating!
Open the Roblox Animation Editor, then you can start animating!

You might find something different, when you move the Right Arm, the Gun doesn’t move. This is because your weapon is connected to the Torso instead of Right Arm, like a legacy Roblox tool does.

Benefits of this:
The advantage of connecting to Torso instead of Right Arm is you can animate the gun freely instead of sticking to the Right Arm all the time.

Examples:
LMG reloads:
Image from Gyazo

Reloading with right arm

And more! You can also animate knife tricks animation with this, without the knife being stick to the Right Arm all the time.

However, in this tutorial, I’m not going to teach how to animate the gun since I’m also a Junior animator, but that’s how you animate details of a gun!

7: Essential part: In game

You will find this not working in game if you just put it as a typical tool, there are few steps to do before you put it into the game, which requires some scripting.

While animating it, the dummy’s torso is attached to BodyAttach, so does a player character do! You have to create a Motor6D to connect Player’s Character’s Torso manually when tool is being equipped, and destroy it when tool is being unequipped. This has to be done in Server, but you can perform it on Client first before the server for better visual effects.

Remember to implement a RemoteEvent in ReplicatedStorage. I name the Connect M6D and Disonnect M6D RemoteEvent ConnectM6D and DisconnectM6D respectively.
I also create the Motor6D inside the Torso when CharacterAdded.

Client script inside the gun tool:

script.Parent.Equipped:Connect(function()
	game.ReplicatedStorage.ConnectM6D:FireServer(WeaponTool.BodyAttach)
	char.Torso.ToolGrip.Part0 = char.Torso
	char.Torso.ToolGrip.Part1 = WeaponTool.BodyAttach
end)

WeaponTool.Unequipped:Connect(function()
	game.ReplicatedStorage.DisconnectM6D:FireServer()
end)

Server Script:

game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)		
		local M6D = Instance.new("Motor6D", char.Torso)
		M6D.Name = "ToolGrip"
    end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)
      local char = plr.Character
      char.Torso.ToolGrip.Part0 = char.Torso
      char.Torso.ToolGrip.Part1 = location
end)

game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
    plr.Character.Torso.ToolGrip.Part1 = nil
end)

LAST, LAST BUT NOT LEAST! Remember to DISABLE RequireHandle in the tool!
image

That’s all about it! If you have any problem, feel free to reply and I’ll be glad to assist you
My aplogies for such a rushed tutorial, I might add more information when necessary. :slight_smile:
Happy animating guns… I guess?

11/17/2020 Edit:
Yes, obviously this is exploitable. Because someone actually wrote an exploit script for this lol. It can easily be exploited by cheaters mainly with the Remote Event “ConnectM6D”
I recommend doing server checks, when the Remote Event is being received, check whether the part is valid (is it inside a tool? is it a descendant of player’s character?) etc.

Sorry for not responding to the questions raised in this thread, I’ll try to make a video and explain it in detail soon if I have time.

1242 Likes
How to animate a sword?
How do I replicate Real Arm movements to Fake Arms (ViewModel)?
How could I make your arms and head follow your mouse up and down?
How would I rig a weapon to an r6 character model using scripts?
How to animate weapons?
[FEEDBACK] Glock 17 Comission
How do I make a sword unsheathe animation?
Motor6D Equipping
Welding an item into an animation
Any working gun tutorials?
Motor6D still not allowing animation
Animating something to go down and up
Motor6D Confusion - Connecting Rigs
Trouble animating tools
Animation not playing in a tool as it should be?
How to devs get their animations spot on?
How Motor6D weapons work?
Attempting Gun Bobbing (not swaying!)
How to cframe unfold?
[~45-65K R$] Looking for Weapons Engineer
Animation is inaccurate
Why is my gun acting weirdly?
Model stuck in dummies torso instead of being held in the hand
Motor6D being Parented to Nil
How do i load an animation onto a tool
Animating the drawstring of a bow?
Writing an FPS framework (2020)
How can I animate a tool?
How to Have a Different Idle/Walking animation play when tool is equipped?
Mouse Position based gun orientation
How can I get my arms to view my camera?
How can I make this Jetpack move more realistic?
How to animate with tools out of the hand?
Best way to animate guns?
How do i put items in animations?
Motor6d animations not working
How to convert gun "model" to "Tool"?
Making a tool appear in a players hand and Animate
How to animate a tool/object with a Dummy in the Animation Editor
How i can connect a Sword to Right Arm using Motor6d?
Help with non-tool-based grappling hook
Make toolgrip like existing offset from 2 parts
Playing animation works fine in editor but doesn't move specific parts while playing game
Parts from a player's animation do not replicate to the server
Animating fps viewmodel arms
Help with making ViewModels
Having problems with Motor6D tool animations not playing entirely
How to animate great in Studio?
How to animate a tool/object with a Dummy in the Animation Editor
Tool animation error
I need help with playing this animation properly
How can i prevent exploits in this script?
Raycast Hitbox 4.01: For all your melee needs!
Alternative to attaching my tool's Motor6D?
How do you animate a tool
Motor6d not working
How to make a script that using emote with model?
Weapon Animation Resets Back From Where It Started
How to script a duel wield weapon
How to make a RPG mob
Help With Animating a Weapon
Help with animating gun
Help With Animation (I really need help)
Real-time slash effects syncing to an animation
Weld/Part auto-deleting when used? (SOLVED)
Tool looks kinda broken (Animation)
Can anyone help me with moter6d
Animating a tool
Custom scripted tool system help
Help with animations
How do I go about making an FPS gun system? I'm a new at FPS yet I have a lot of experience scripting other things
How to Create Tools and Animate Them [TUTORIAL]
How to Create Tools and Animate Them [TUTORIAL]
Animation not working on tools
How do I animate with a weapon?
How do you make a gun go on your back when you don't have it equipted
Weapon moves fine in the animator but then doesnt move properly in game
How would I make a Finisher?
Making a Tool Permanently Stay in The Players Hand
Problem with animation for right hand only
Tweening a moving part?
Hold Animation Is Not Working As Intended
How to animate guns?
Why doesn't my animation work?
Why Isnt my tween working on my part on my tool?
I need help with item handles and animations!
How to make tool following camera smoother
Where can I find resources on animation?
Tool doesn't get animated in Moon Animator
Sword Sheath Problem
Hand moves with gun while doing stuff with motor6d
Animation priority? More information
How can I add an object in the animation editor
Tool animations don't replicate from client to server
How to make a dual wield tool?
Tool in an animation not moving
RightUpperArm not moving?
Animating/Tweening a tool with welds
Feedback on my hammer attack
ROBLOX MAN Support. (How to attach gear or accessories to an animated ROBLOX MAN)
Animation of a Tool works fine in the Animator, but not in Game
Bolt action weaponry help
Motor6d.C0 breaking up animation
Motor 6D is not working with arm movement script
Problems with animating weapons?
Why isn't this working?
How to animate guns
A certain part of a animation wont play
How to make a first person aim system?
Issues with Motor6D not animating tool
Better Baseplate?
Animation isn't Working
Motor6D won't function properly with animation when character is moving
Animation doesn't load well
How would I animate a gun
How to animate tools
How to tween a slide on a gun tool?
Handle of Tool is Not moving at all
Can someone point out a few good animation tutorials for melee weapons?
How would i make complex animations?
Where to start with gun animations and stuff
Where to start with gun animations and stuff
Motor6D Delay for Tool Animation
Tool teleport me to the last equipped position
Sword Animation
How to animate a mesh of a tool inside of a ViewModel
MP5 Fire Mode System
Hold Animation Is Not Working As Intended
Blender + Roblox animating
How to add a part to an aniamtion
Tool not moving with view model arms (FPS)
How do you animate parts in an animation?
How to spin the barrels when mouse is held using a script
Help with attaching sword to character with Motor6D
AnimationProblem
How to use cframe to make object animations?
Gamepass Asset wont load correctly? (R6)
Tool animation not playing
Does anyone know how to apply animations to parts?
How do you animate a tool?
Cant see my hand in gun holding animation
[Help] How Do I Make Parts of a Tool Move?
How could I make your arms and head follow your mouse up and down?
I'm following a tool animation tutorial; help?
Problems with my guns on my star ships
I have a problem with random tool animation
What is the easiest way to learn motor6d?
Trying to move arms with tools (FirstPerson R6 only)
Tool Parts not moving with arms (R6) please help
Animation | Can't Select HumanoidRootPart
How could I make your arms and head follow your mouse up and down?
CFrame Issue with my tool
Character spawns with a sword in their right arm (R6) without gear
Help with Motor6D
Animating Tool Parts, delay issue
Is there a way to animate a tool?
How do I animate animals?
How do I make an animation with a mesh in it?
How do you detect if ButtonR2 is held down or not with ContextActionService?
How can I include objects in animation
Gun handle not holding corectly
New game made by me! PRISM
Final Attempt At Help For Tool Rig Animations initial delay (Help!)
I would like to make a gun idle animation
Animation weirdly not loading
How to prevent the object from constantly being created
Character mixing animations
How do I animate a dummy holding an object
Having Tool Equipped While Jumping Knocks Character Back
Issue animating Handle inside my Tool (Simplified Title)
How to make it so this Snowball Tool properly animates when used in game
How to animate Tool Handles easily! (Specifically melees, unsure of guns)
Custom Animations for Tool like Walk etc. but without setting roblox default ID?
Trouble animating the sheath with the katana
How do i animate a skateboard
Script does not create Motor6D
Animating tool does not work as expected
Making an OTS gun system - Where to start?
Motor6d help with sword

Thanks! This is very useful and it’s explained very well, I might start animating guns soon!

66 Likes

Very well taught tutorial, i might even consider moving back to animating again! :smile:

29 Likes

Will this worked with lightsaber as well?

25 Likes

Any model i think, all you’ll have to do is follow the steps in this guide but do it for what you desire to animate.

10 Likes

Yeah but the script kinda make me confused it not worked in studio when I test it.

11 Likes

The script is for reference only! It’s a part of my code and you have to set up variables and instances by yourself.

22 Likes

I can’t select the gun while animating with the default ROBLOX anim editor. Any help?

10 Likes

Really good tutorial! Although, i just have a question. Does this work with R15 too?

9 Likes

It should work with R15, just use UpperTorso instead of Torso.

23 Likes

It says that ToolGrip is not a valid member of part, still doesn’t work even though if I add a :WaitForChild. Do you know what to do? I can send you my full script that I added variables to, if necessary.

5 Likes

I fixed the issue, but now it won’t even play the animation when I try to equip it.

Here’s what it looks like in the game: https://gyazo.com/8fa67950b50682c508bd362cd6b7b6f7

Here’s what it looks like in animator: https://gyazo.com/e4e54bbc8793978e47ab69be2ba7d5f9

What it looks like on a regular tool: https://gyazo.com/1df5cde578ac41cf89e4e152cbaa7562 (just to prove that the animation actually works)

If anyone could add me on Discord to help me resolve this minor issue, please add me: stick pepega#1603

5 Likes

Never mind, I figured it out. It seems like you can only play the animation through a local script.

4 Likes

Thanks for this, I’ll definitely try this out, however I only know the simplest of scripting so I might have problems with that part of it.

5 Likes

You wanna know what would be REALLY nice? A video tutorial, following this step by step. My small brain hurts when I try to follow this as how it is. I think it’d help others (including myself).

My brain hurts. Send help. No, I did not manage to get what I wanted (to animate my tools with motor6Ds.)

31 Likes

Please if you don’t mind is there any possible way that you can provide a very basic example model/file of this?
You see I learn faster by looking at models.

7 Likes

Help, it doesn’t seem to work for me, I want to make a Idle animation for my gun. I followed every instruction you did, but it didn’t quite work for me so I made it so it waits for the motor 6d to be made. It seemed to work but now this happens :
s

and this is what it’s supposed to look like
s

It’s my first time animating a Gun. I also put the priority to Idle. I have no idea what’s happening. What I saw is: Normally when you spawn, your character has a idle animation it kinda breathes. But when I equip the gun , it stops the idle animation. I don’t know what may be the problem, someone please help. Thank you

8 Likes

You need to set your priority higher, ‘Idle’ is overridden by the tool’s default holding animation. It’s safe to put custom idle animations as ‘action’ priority, it will still be overridden by any ‘actions’ you play next.

15 Likes

Thank you, I solved it today already. I was very confused why this was happening.

2 Likes

I’ve been using that weld plugin ever since I originally saw this post. Super helpful man. Grateful to have had this in my time of stupidity.

4 Likes