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

Yes i have and it worked out alredy

this is really helpful, I made a bugle out of this

now there’s no need (or still?) to use CFrames in animating the tools now, I’m really new to CFrames and it’s very confusing to me

thanks!

Does the model have to be inside of a tool in order to work? I find the core gui annoying.

Ok it works thank you so much! I Played the animation using Animator:LoadAnimation()

How’d you fix this issue? I ran into the same one

I’m alos getting the tool grip error @ToxicalGamer2006 when you made the script did you see if the toolgrip was in the upper torso? Mine dosent appear at all

I am working with R6 but you need to make something like this:

Inside the ServerScriptService the script we used:

game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)

		local M6D = Instance.new("Motor6D")
		M6D.Name = "ToolGrip"
		M6D.Parent = char.Torso
	end)
end)

game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)

	local char = plr.Character
	char.Torso:FindFirstChild("ToolGrip").Part0 = char.Torso--- I used "FindFirstChild" for the script dont get any problem
	char.Torso:FindFirstChild("ToolGrip").Part1 = location ------

end)

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

On the tool is something like this:

tool.Equipped:Connect(function()
	local char = plr.Character or plr.CharacterAdded:Wait()

	game.ReplicatedStorage.ConnectM6D:FireServer(tool.HammerParts.BodyAttach)

	char.Torso.ToolGrip.Part0 = char.Torso
	char.Torso.ToolGrip.Part1 = tool.HammerParts.BodyAttach

	local Humanoid = char:FindFirstChild('Humanoid')  
	Idle = Humanoid:LoadAnimation(script:WaitForChild("Idle"))
	Attack1 = Humanoid:LoadAnimation(script:WaitForChild("Attack1"))
	Attack2 = Humanoid:LoadAnimation(script:WaitForChild("Attack2"))

	Idle:Play()
	sound:Play()
end)

tool.Unequipped:Connect(function()

	game.ReplicatedStorage.DisconnectM6D:FireServer()

	if not Idle then return end  	
	Idle:Stop()
	Attack1:Stop()
	Attack2:Stop()
	sound:Stop()
end)

In your case if ur working with R15 you need to use R15 parts.

5 Likes

Hi im trying to make animations for my game but idk how to actually make them play when you equip the tool? sorry im rlly new.

Connect the motor6d to the right arm instead of torso

It doesnt work for me my output says: ToolGrip is not a valid member of Part “Workspace.GoingOffTopic.Torso”

use :FindFirstChild(“ToolGrip”)

1 Like

Im using the FE gun kit (edited version) made by thienbao2109

and i did everything in this tutorial and i got this error

anything to help me?

1 Like

yea im using that too, not working either but it doesnt show any errors :confused:
but for that error just means that the script doesnt know what “BodyAttach” means

1 Like

Do you use UpperTorso or LowerTorso, they both bug out my animations. Idk what im doing wrong.

If you are using r6 then you have to set to “Torso” in r15 you set to “UpperTorso”

So I’m making a reload system for my gun here, and the magazine nor the weapon itself is moving with the animation.

first the animation needs to be “Action”. And when you change the weapon to the character for animate it did you add Motor6D in all gun parts (all parts you need).

The animation priority is set to action, and ‘mag’ and ‘bolt’ are connected to motor 6ds yes.

The animation works perfectly in the animation editor with the magazine and weapon working, however in-game the gun does not move.

1 Like

Hi! I’m having an issue when trying to equip my weapon during gameplay, I get this error:

more about it on my dev forum post here:

if anyone has the solution please let me know asap

does alt+click work?
(for selecting parts within models)

I have no clue if anyones going to see this, but the tools seem to be having issues with other players? Does anyone know how to fix this?

https://gyazo.com/f0d8708de9184966f66e0dad4247738f

EDIT: Fixed

1 Like