What’s wrong with the Tool object doing the welding for you when equipping? If you do not like the hand-out, you can override it by playing an animation. Just make a simple animation for holding the tool and play it when the tool is equipped. It’s your easiest option.
To weld the tool, you should consider the length of the limb your attaching it to. With this code, I’m assuming your using custom avatar scaling so the following script should work for you.
local part = -- Handle that you'd be holding
local Character = -- Character
local weld = Instance.new("Weld",part)
weld.Part0 = part --Attach to the handle
weld.Part1 = character["RightHand"] --Attach to the right hand.
weld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,character["RightHand"].Size.Y/2,0)
This should allow you to weld to the an R15 hand, however this script doesn’t respect the tool handle’s orientation, so try to make sure you play with the handles rotation against the tool to make it upright.
You’ll need to weld it to the RightHand each time you equip it.
Tools automatically weld their handles to the player’s arm. Not sure what the issue here is.
Searched for what? Are you trying to make toolless tools or what? In both examples, you’re using a Tool instance yet state that it’s not welding to the hand. I’m confused.
Scripting Support is also not a location to ask for code. What have you tried yourself thus far in attempting to solve this?
I am using custom animations and I know tools automatically weld their handles to the player’s arm
The hand being stick out was ruining the animations that’s why
I tried using weld constraint and Moon Animation Plugin and I could not figure it out because the tool was not being positioned to my hand in the end I asked for help and I was going through alot of forum posts instead of any advantage I got confused thats why I asked for help
In return I got a simple fixed.
I see, so you wish to use Tool instances while using a pseudo-handle to void the animation? Thanks for informing me, I suppose.
As a cautionary note, you should not be putting this code in a LocalScript. The only one who will see the tool properly held is the client. Contain this logic in a server script so that all clients can see that someone is actively holding a tool.
For programming etiquette, you can probably attempt doing the bottom. However it’s mostly for the purpose of understanding the code. There wouldn’t be any difference in performance in my eyes and it’d make no difference in what the outcome would be.
I know this may have been said before, but please do not use Scripting Support for asking for code. Your question wasn’t clear enough. Be more careful next time.
In his defence, I think that he was asking a question on how he would weld it. While the wiki would have been a great resource to reference, he said what he was attempting to achieve, he explained the issue, which was he wanted to know how to weld, and he mentioned that he could use the tool which acts as a solution.
Personally, I think the thing people are concerned with when asking for code is that they ask people to complete their task for them without learning a single thing , but this was only 5 lines and I did this within my Study period, and those 5 lines can be adapted anywhere.