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

yeah i did, however the complications of animating the gun with welded to the torso, makes it unethical to animate, by doing that you’ll end up with so many so many unnecessary key frames that are bunched up to compensate animating the weapon to line up with the hand, however it makes animating easier such as cool reload animations, or throwing the weapon in the air unbounded to the hand

though in the tutorial it said you could do it in blender with constraints, but i don’t know how to do that in blender and let alone know which constraints to use, since the tutorial didn’t list the name of the constraints

and duel wielding, i would like to do that but scripting it might be a bit complicated and im not that good at scripting.

1 Like

You could modify the script given and clone a line for the motor6d of the other arm and replace the name!!! (torso again, if youd want), for blender, good luck dude, idk NOTHING about that :joy:

say for example you wanna animate flipping a coin in the air and catching it, I would weld it to the hand but once the coin goes into the air, it’ll be tricky to animate the coin in mid and the hand because whenever you move the hand the coin also moves, however if you would weld the coin to the torso, you’ll have to bother having to line up the coin to the hand for each keyframe and that’ll be annoying, but however animating the coin in mid air will be easy since its not bounded to the hand

1 Like

Yeah i know, but you gotta deal with dat bud

I don’t know if this is a mistake or something, but you’re not connecting the Motor6D here, you’re just repeating the animation process

2 Likes

For those with problems theres more posts with similar methods to achieve similar results:

2 Likes

this is superrr useful bro
thank you for not keeping this method to yourself bro

I have a little bug, the output is telling me I have an invalid animation id but I just uploaded the animation I made and copied the correct code… anyone got an idea of what this can be due to?

2 Likes

Anyone know why my gun keeps appearing in the workspace??
image

3 Likes

make sure to weld the BodyAttach’s parent too

1 Like

Hey I followed this tutorial and my animation looks like this in game below. how can I fix it?

Where do I put the three scripts that are in the tutorial?

Hey :smiley:
Something weird is happening in the animation editor for me. I made sure to follow each step precisely.
First of all (idk how relvant this is), my dummy snaps to the weapon, not the other way around.
The main problem however is that neither the weapon nor the torso are movable. When I try to move either, the torso spins a lot. Also the grid below the dummy turns. This happens on R6 and R15 and I also played around with switching the Motor6D parts. The weapon-parts are unanchored and can‘t collide.
However the rest works find. Head, hands, legs etc. are movable.

Does anyone know what‘s going on?

1 Like

Thank you so much for this tutorial. Not only did this help for FPS creators, but other genres of Roblox and my project that I am working on specifically.

Is there any tutorial out there specifically for building a functioning gun off of this?

Thank you in advance

1 Like

Just make sure the different parts you want to animate are separate objects. If you don’t know how to use Blender yet, I really suggest you learn and I’m sure you’ll pick it up fast because it’s very intuitive. I was very rusty because I took a couple years break, and was able to come up with this weapon model after a long day of working. You can look at how I have the different parts set up:

Then I just rigged it using this tutorial that we are commenting on, which btw surely is the best tutorial there is on this topic! Very straight-forward and worked fantastically.

I then attempted to animate it in Roblox studio, which was a big mistake because the animation editor feels trash and if that’s not bad enough it crashed on me after I was almost done doing the reload animation. So out of frustration I decided to learn how to do it the proper way, using Blender.

I used the Blender rig exporter by Den_s plugin to export the rig into Blender. I set up a dope sheet panel, playback panel, graph editor panel and began animating. You can look up a tutorial for that, it’s actually surprisingly easy and animating felt much much better than doing it in Roblox. After a couple hours of animating I came up with this:


Which I admit looks pretty unnatural but I’m soon going to spend some time learning how to use the graph editor to give it some nice sway and motion.

Hope this helps! If you have any questions about the process feel free to ask me as I already spent a lot of time figuring everything out.

2 Likes

Lets say we named our handle “Body Attach”. The animation saves for “Body Attach” named part. So if I try to change the name of my handle to “BodyAttach” anim does not work. Do I need to remake the anim or is there a way to change the name and still keep my anim?

1 Like

When I run the game, the bow isn’t in players hand and the parts fall down. This is the Error from the server script:
"Players.smarties1920.Backpack.Tool.LocalScript:4: attempt to index nil with ‘ChildAdded’ "
Anyone knows how I can fix this?

In the animator, the key for BodyAttach is installed, but when starting the game, the weapon position is not the same as expected. I didn’t find any information about this in the guide. Should I use Tool Grip Editor to adjust the position?

Moon Animator:
RobloxStudioBeta_OAAHRwg7xT

Game:
RobloxStudioBeta_12MEV3AJWH

UPD: The problem was with RightGrip, which is created automatically even though RequiresHandle is unchecked.
изображение

1 Like

if you guys wanna animate using torso using blender use the “child of” constraint
and since the constraint can get a bit iffy sometimes use this video to help make things aligned

and lastly don’t forget to bake the animation

export it as fbx and import it to roblox

Hello everybody! I saw a lot of comments saying that the script to make the gun go to the players torso isnt working. Here is an updated script I made!

script.Parent.Equipped:Connect(function()
	local plr = game.Players.LocalPlayer
	local char = plr.Character or plr.CharacterAdded:Wait()
	
	local motor6d = Instance.new("Motor6D")
	motor6d.Parent = char:WaitForChild("Torso")
	motor6d.Name = "ToolAttach"
	
	motor6d.Part0 = char:WaitForChild("Torso")
	motor6d.Part1 = script.Parent:WaitForChild("BodyAttach")
	script.Parent.Unequipped:Connect(function()
		motor6d:Destroy()
	end)
end)

Hope this helps!