Could you supply other information about this? I still don’t have enough to work off of.
What is the hierarchy of the model?
How do you attach this to the player? What’s the code you’re using?
Can you confirm that a matching attachment for the handle exists in the character?
I’ve provided a small repro so you can check if what you’re doing matches exactly with the tutorial or my given implementation. Following through is important, including with naming choices.
This will work for any limb that has attachments in them. When you use AddAccessory, the Humanoid will line up attachments between the accessory’s handle and one of the same name within the rig, then weld the attachments together. I do recall there being attachments in leg limbs so absolutely it would.
If you need to change the grip, you would need to change the properties of the accessory and then reattach it to the player. You may lose some of the instant offsetting magic that a Tool instance provides primarily because once you change values around, the joint between the attachments may break.
How would I do this with a tool/model consisting of multiple parts? I’ve tried things such as parenting the parts to the handle but only the handle is affected.
You will need to weld all extra parts to the handle. Parenting will only change where the part is located in the hierarchy but it doesn’t have any implicit behaviours. You can find several resources, plugins and code samples to help you perform this. Studio also has a built-in welder via the constraints menu.
Hello! How would I go about moving the right arm using this implementation? What I mean is when you use a normal tool it automatically moves the arm up so I would like to copy this behaviour using this method. Do you do it with animations?
Yes, you would have to do this through an animation just like how it’s done for regular tools. The Animate script accounts for an equipped tool and then plays the generic tool idle animation: this behaviour will have to be modified, mimicked or done in another way.
I do not have an edit of the Animate script handy in this case. You can consider making use of BindableEvents and RemoteEvents to accomplish a mod similarly to how the Animate script checks for a tool before playing the hold animation.
If you were to put a model in an accessory, the requirements don’t change. All that would happen is that your parts now belong to a model instance and are a generation down in the hierarchy. So long as you still have a handle outside the model and the parts are welded to it, you’re good.
If what you meant by “can we do that with models” as in foregoing an accessory and instead directly applying models to players, you can do that as well. You’d virtually follow the same steps including adding attachments so it’s easier to position your models. Main difference is you’d have to handle the welding yourself. You can use the following code to do that:
that mean if in the model its still have a handle it will be good? and also does the model need to be setPrimaryPartCFrame also what is the best way to position it (when there are no model) because its kinda hard and poopey to position it also the explanation is somehow confusing and the model dont actually works (i used model because it has texture insibe so i couldnt union it)
I’m not too sure I understand what you’re asking here or if there any inferences being made. To be clear: handles are just regular parts. Some objects on Roblox require this specially named part for various actions, but there doesn’t always need to be a handle so long as you’re willing to do all the welding yourself (e.g. accessories, tools, so on).
No. Unanchor all the parts, weld them to a root (typically might be your PrimaryPart which is the Handle) and they will automatically have their positions updated when the root part moves.
That’s why the attachments exist. When you weld two attachments together, ideally they should line up, so the model is snapping at the position of the attachments. You can see in the picture tutorial I had up that the two attachments eventually connect, leading to being able to grip the tool the way the character does in the last screenshot.
Honestly I still find C0 and C1 confusing myself. They’re meant to be offsets for Part0 and Part1 since not setting them will make the parts snap together in the middle. In this case, I’m using both accessories to “offset” the parts when they get attached to the player.
It’s better to see how the parts behave when you actually start welding. An explanation really doesn’t do those properties too much justice.