How to Attach Model to Character as a "Tool"?

Hello Chat and fellow developers! :wave:
I don’t really know how to connect parts/models to the hands or other body parts of characters. I looked all day for me to just find the same problem: IT WON’T WORK.
Context and Explorer:
image
The Chainsaw is the part I am trying to attach. I just used it as placeholder until my modeler can model the actual chainsaw.
btw I tried:

  • Welds
  • Constraints for the Weld (Rigid, Weld, etc.)
  • etc.

I am not trying to use a tool as that doesn’t fit my goal. I also tried accessories but ofc it doesn’t work :roll_eyes: . If you got anything or any ideas you can pull from your past experience you can slide it here!
Thanks for stopping by :slight_smile: and have a great day/night!

Try this!

LOL I think I mentioned I don’t want a tool but yeah I already know how to do that.

Heya! If you want to use models as a “Tool,” you should use Motor6Ds. These also let you animate the models!

To set it up:

  1. Add a Motor6D to your primary hand (or the limb you want to attach the model to).
  2. Set Part0 to the limb and Part1 to the main part of your model that holds everything together.

Once done, the model will teleport to the limb and move along with it.
You’re essentially doing this, except the tool part.

1 Like

Ok let me try this! Btw is there a good way to orientate the part or does it autorotate correctly?

The main part of your model will rotate along with the limb. Since your main part welds all the other parts of the model, those will rotate with it too.

1 Like

image
It kindof does this instead, how can I fix it.
Here is the code:

local RightArm = Character["Right Arm"]
	local LeftArm = Character["Left Arm"]
	local Chainsaw = DenjiAssets.MoveSet.M1.Models.Chainsaw
	
	--Right
	local RightSaw = Chainsaw:Clone()
	RightSaw.Parent = Character
	RightSaw.Name = "RightSaw"
	
	local RMoter6D = Instance.new("Motor6D")
	RMoter6D.Parent = RightArm
	RMoter6D.Part0 = RightArm
	RMoter6D.Part1 = RightSaw

You could offset the C0 of the Motor6D to have a simple adjustment.
E.g
RMoter6D.C0 *= CFrame.new(0, -2, 0)

Or you can make an idle animation, which animates both your limb and tool.

1 Like

EDIT:

So yeah actually I tweaked my code a bit more and used the C0 and C1 property. I used the GripAttachment and the attachment on the chainsaw!
I appreciate this and am marking this as a solution :slight_smile:
Btw so if I ever wanted to make animations I would make the exact same thing the script does in workspace with a dummy, and the animation editor will register it as something animatable?

Awesome! Glad it worked out :smiley:

And yes, if you want to make animations you’re basically doing what the script does. The link I provided goes more into deatail if you’re having issues. Good luck with the game!

1 Like

Thank you, man this explained how to do all of this!
I was straight tweaking for the past week trying to actually weld smth without using a tool cuz I don’t want the player to toggle the chainsaws themselves.
Hope you have a great time with your games :fire:

1 Like