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

image

Please help

2 Likes

just dont connect a motor6d twice

1 Like

Thanks for the tutorial, but Im still confused on some things. From your screenshots and from looking at your game, theres a lot that you left out while calling yourself a ‘junior developer’(youre too humble, lol). What resources did you learn from? Have you made any more posts on this subject?

1 Like

How did you manage to fix it? I’ve been having the same problem and I still haven’t found a fix.

2 Likes

You need to set the animation to looping. If you don’t, the idle will stop after its finished.

1 Like

The script is set for R6, and he’s using R15.

1 Like

Thanks for the great tutorial!! I really will use this but I do have one question. Since the gun has a Motor6D in it will I be able to move the parts from the Animation Editor??? Also with the stuff like the SMG how did you make the Magazine fall off then appear in the players hand to go back in (and how did you make it go perfectly back in I am not much of an animator) without the player seeing it move up to your hand.

2 Likes

Hi! i have a question, how you did the arms moving in your gun?

(im new at scripting)

1 Like

Since this is highly requested question by @GeneralLPrince, @takticiadam, and you I will answer it. You can make a LocalScript and put it under StarterCharacterScripts.

--!strict

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local Player = Players.LocalPlayer
local Mouse = Player:GetMouse()
local Character = Player.Character or Player.CharacterAdded:Wait()

local Torso = Character:WaitForChild("Torso") :: BasePart
local RightArm = Character:WaitForChild("Right Arm") :: BasePart
local LeftArm = Character:WaitForChild("Left Arm") :: BasePart
local LeftShoulder = Torso:WaitForChild("Left Shoulder") :: Motor6D
local RightShoulder = Torso:WaitForChild("Right Shoulder") :: Motor6D
local Humanoid = Character.Humanoid :: Humanoid

local OffsetMouseYAngle = math.rad(15)

RunService.RenderStepped:Connect(function()
	if Humanoid.Sit then return end
	
	local mouseYAngle = math.asin((Mouse.Hit.Position - Mouse.Origin.Position).Unit.Y) - OffsetMouseYAngle
	
	if LeftShoulder and LeftArm then
		LeftShoulder.C0 = CFrame.new(-1, 0.5, -0.2) * CFrame.Angles(math.rad(70) + mouseYAngle, math.rad(-90), math.rad(52))
	end
	
	if RightShoulder and RightArm then
		RightShoulder.C0 = CFrame.new(1, 0.5, -0.2) * CFrame.Angles(math.rad(120) + mouseYAngle, math.rad(90), math.rad(-104))
	end
end)

This code should be self explanatory. If you want to make it tool only then you will need to do it yourself as a homework since I already shared the complete code :slight_smile:

Please note that this only works for R6 rig.

4 Likes

Damn, I figured it out after 2 months of my post in the hard way but cheers mate. Hopefully it’ll help those who are struggling with it

2 Likes

Thanks! This is very nice for me :slight_smile:

Would this work with accessories by any chance? I’m not a big fan of the tool system ROBLOX uses so I wanted to create my own system for handling tools.

I’m using the Fe gun kit and i rename the Handle Body Attach, and it does not work, because (for example) a script would be like if click then play sound.Handle

Is there anything i can do?

If you’re going to get it work,

Normal FE Gun kit is not compatible with this so you have to use the Custom Grip version made by @thienbao2109

oh thanks, can you send the link to me? Thank you!

1 Like

Im using the fe gun kit made by @thienbao2109 , and heard from @banktoner that @thienbao2109 he made a gun kt compatible with this. If you know, can you send the link to me?

1 Like

Can you send me the link to @thienbao2109 's FE gun kit that’s compatible with this post?

Really appreciate this topic, thank you so much. I also have a question if you don’t mind, how do you animate the camera with the animations?

2 Likes

In the first GIF, the AWP Equip. How did you manipulate the camera cframe? Like that camera shake.

2 Likes

Using this one because seems better

viewmodel x physic particles - Roblox

Kinda new to gun systems and I was wondering how I could make a tool that, when the player reload & has the right ‘tool’ aka ammo box, it adds ammo to his current count?

2 Likes