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

That is what a resource like this is supposed to help him with right? Nothing wrong with asking it.

Hopefully this helps you figure it out. This summarizes where to put the script.

1 Like

Roblox code changes over time.

local scripts stay in workspace I’m pretty sure

Not necessarily and don’t recommend it at least in terms of the general use of LocalScripts. Depending on your game you may present yourself in some situations where you may need to use a LocalScript in the workspace but as I stated earlier in terms of the general use of LocalScripts I recommend keeping a good sense of practice with putting LocalScripts in

  • StarterPlayerScripts, StarterCharacterScripts, ReplicatedFirst, StarterGui, ReplicatedStorage, and ServerStorage (since both Replicated and ServerStorage are places to store assets, etc they would be used slightly differently depending on your situation).

However, the one place you should not be putting LocalScripts would be ServerScriptService. Because as the service clearly states it is used to hold Scripts that run on the server’s side rather than the client.

In the short term, LocalScripts should mainly be put in places that copy itself locally to the client. I could’ve explained this easier but that’s the just of it.

I tried to get my tool to stay on my character’s body, but the tool did not stay. Where could I had possibly made a mistake?

If the tool is just falling, make sure that there is a part in your tool called “Handle” which has WeldConstraints linked to every other object in your tool.

you are awesome, dude, you are awesome

How do you animate without motor6 to the body of the rig?

for some reason i cant move the extra parts to move they i try to rotate them but they just stay still

im having the same issue did you find the solution

DUDE. I cannot thank you enough. I have been through the 5 stages of grief trying to figure out the same issue that rouge had. THANK YOU.

1 Like

This tutorial helped me tremendously! For me there’s just one problem.

What the animation should look like:

What it looks like in game:
Screenshot 2024-06-14 at 5.58.55 PM

It seems like the BodyAttach part somehow got flipped upside down somehow even though I never changed the rotation of it through script.

The code on the server:

(Keep in mind that I am not using a tool in my scenario so the code will look slightly different.)

The code in my LocalScript:

If someone could offer me a potential solution that would be great!

1 Like

@GIEGO04 @IceCreamPickels

Why is this just the animation AGAIN instead of “connecting the Motor6D locally” section?

Mess around with the C0 rotation in the ToolGrip, and copy it, then apply it to the actual Motor6D in a script

(Adding rotation is very DIFFERENT for attachments like this, you cant just do C0.Rotation, you have to do something I forgot but search it up and it’ll be simple)

I forgot I posted on here but I just figured out a solution, apparently I must’ve rotated the sword on the animating dummy on accident before I started animating which screwed up how the animation looked in game. Thanks for the help though, appreciate it!

This is what happened to me, and changing the grips rotation was my solution. I have a question though, are you not supposed to rotate the object…? What are you supposed to do after attaching the Motor6D to the animation dummy?

You use CFrames and instead of CFrames.Angles(), you use CFRams.FromEulerYXZAngles()
or some order like that

I have this issue where the animation loads in the animator preview, but following all the steps and running the animation in the script, the parts of the weapon does not actually change but only the character moves, any solutions?

Remove RequiresHandle and if that’s already off, maybe there is a weld ex:) RightGrip that is keeping your object from moving