So if I want to use that for any other part of the gun I just change the Part1 to whatever I am animating?
And then when I have animated everything I can basically use that one animation and it will play on both the gun and the character?
But I will need to Motor6D the same place as when I rigged it?
Also correct. If you want to animate the Mag, and the Hammer for example, you would have two Motor6D’s inside the Handle of the gun. The ‘Mag’ Motor6D should have it’s Part0 as the Handle of the gun Part1 as the Magazine of the gun. The ‘Hammer’ Motor6D should have it’s Part0 as the Handle of the gun and the Part1 as the Hammer of the gun.
So everything worked except that I couldnt move the hammer.
I could move the main Handle, but not the hammer. It just wouldnt move!
All the parts in the gun are CanCollide = false and Anchored = false and collisions are turned off.
Here are some pictures and GIFs:
You could always just make a handle, set the transparency on it to 1, then add the hammer the the handle mesh which will be fake to the real handle which will allow you to animate them seperate.
Edit: Nvm, its probably because you’re using a weld instead of a motor6d.
Hey, I animated the thing and everything worked. But when I tried to impement it into my weapon only the arms moved and not the hammer (top part)
Why? (I took the Motor6D the same place!) https://gyazo.com/3d47c1fc4ac3e5941e3dd1df28931722
No problem
Yeah I took a motor6D in the RightHand connected to the handle + handle connected to hammer.
But on my tool I only have one motor6D, handle connected to hammer. Should I use a script to make a motor6d that connects the handle to the players right hand whenever it is equipped?
Yes you need a Motor6D in the RightHand connected to the Handle otherwise it won’t work. If you remember, the Handle is the main part that represents the whole gun in the Animation editor.
I do have a Motor6D in righthand-handle. But, not in the tool that i equipped. Should I use a script then? But I tried to use a script and it didnt work. If you look at my GIFS that I posted just a few minutes ago, maybe you get an idea?
Here’s a really simple script to replace the RightGrip with a Motor6D. Place it inside your tool.
local Motor6DName = "Handle" -- Set this to what the Motor6D was called while animating.
local localPlayer = game.Players.LocalPlayer
local plrCharacter = localPlayer.Character
local plrHumanoid = plrCharacter:WaitForChild('Humanoid')
local rightHand = plrCharacter:WaitForChild("RightHand") or plrCharacter:WaitForChild("Right Arm")
script.Parent.Equipped:connect(function()
local origGrip = rightHand:WaitForChild("RightGrip")
local Motor6D = Instance.new("Motor6D")
-- Setting up the Motor6D to replace the grip
Motor6D.Name = Motor6DName
Motor6D.Part0 = origGrip.Part0
Motor6D.Part1 = origGrip.Part1
-- Replacing the grip with the Motor6D
origGrip:Destroy()
Motor6D.Parent = rightHand
end)