How To Easily Make Tool Animations Functional

NOTE:

This is NOT for making keyframes or “actually animating” a rig. There are plenty of other tutorials for that, so I will not explain how.


Credits:

xSIXx - GripToMotor6D and Moon Animator


I’m seeing a sudden spike of people (eg. this post) wanting to make their own FPS games, so here’s some of my knowledge that I’ve gathered over the years.

  1. Insert this script into your tool
    This welds the arms and handle together so that it moves according to your animation
    image

  2. Make a R15/R6 blocky rig via the built in plugin in studio
    image

  3. Duplicate your gun’s “Handle” and another parts into the new rig
    image

  4. Use moon animator’s easy weld and select the right hand/arm, then the handle, then click join (not join in place) in the part tab of easy weld
    image

  5. It should be animatable now, for the idle animation its priority should be “Movement”, the equip animation should be “Action”, so should the fire and reload animations


Resources


incapaz’s raycasting gun tutorial

My FE gun kit tutorial

18 Likes

Unrelated question, ive never used moon animator but is there a way to create a animation using a already existing one without overwriting the existing one? i just cant seem to find a option for this

Well you need to exit moon and save when you’re done with your animation, or click save and close in the file tab at the top

Then you can go ahead and create a new animation in the file tab

yea but is there a way i can use another animation for the start and animate from there?, dont wanna start completely over just to make a firing animation

1 Like

You can export it, publish it and then import it from the Item menu.

Alright got my fire and hold animation, not sure how to play the animations or anything but i got that down atleast.

And for this, i dont know where you change the prioritys at

For Moon you have to export the animation, then when it selects the blue thingy, go to properties and change the priority manually from there

image
alright i got them exported and the priorities set up correctly, now would i save to roblox or?, and then what would i do after that

Yup, save to roblox, then you would code it in into your existing gun framework or use the fe gun kit

Alright, how do i get the animations to play?, and should i have them play via local or server?

Somehow a duplicated version of my gun broken and i cant even delete it

Use Humanoid.Animator:LoadAnimation(AnimationInstance):Play()

Play them locally, otherwise it might lag.

image
got the animation to work, but for some reason the gun goes off to the side,

also since its in a local script how would i get other players to see where the arms are? - (Editx2, since i no little to nothing about animations, i thought it would only be shown on the players screen, not anyone elses)

Also also, how would i do a fire animation, i have my entire fire script on a server script?
(edit, how do i also stop animations when i unequip the tool?)

Did you do join in place or join when you used easy weld?

BindableEvents

It is replicated

Make a variable for the animation then call :Stop() when its unequipped

For the handle, i just did join, although if it matters i used a different tool for the script and put the animations in, was i spose to move the handle into the new tool or could i just use the handle thats already in there with the animations?

So like just figure out when the player is clicking or something and play the animation?

Even then for

how would i do this with the current method i use?

i have this in the local script

RunService.Stepped:Connect(function()
	if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
	if not Tool.Parent:IsA("Backpack") then
			local mPos = ms.Hit.Position

			FEvent:FireServer(mPos)		
		end
	end
end)

and in the server script i got

local shotTime = tick()
local fireRate = tool.strings.FireRate.Value
local timeLimit = 2/3
if not ((tick()-shotTime) >= fireRate*timeLimit) then return end
	shotTime = tick() -- just a cut out segment of the code

how would i make the animation match the firerate of the gun?

Make a bool value for if the gun is firing or not

Not sure how i would use a bool value, especially on fast guns since wouldn’t at some point the animation would get off track from the gun firing?

Also got the animation to stop

And the gun is still pointing the other direction
image
, when i pull it out, for a split second the gun is facing forwards then it flips left

Maybe a script is interfering?

would a welding script mess anything up?

Yes, since motor6ds are welds, except animatable