Is there are way to weld something to an hand

Hello, i am coding a gun, and i am trying to make it so when the player reload , the mag un weld from the gun and weld to the hand, is there someone that can help me on this?

1 Like

Define a variable for the weld, when the player reloads the gun; destroy() your weld in the variable.

Then weld the mag to the hand

Local Weld = Instance.new(‘Weld’)
Weld.Part0 = Player.Character.LeftHand
Weld.Part1 = Mag Variable
Weld.C0 = CFrame.new(Your CFrame)
Weld.Parent = Player.Character.LeftHand

Sorry, I still yet to have to figure out how to post code the correct way.

1 Like

the thing is, how can i weld it back to the gun exactly back where it was on it?

Are you talking about rewelding the mag to the gun?

Yes, exactly where it was [30char+30char+]

Remake the weld for the gun after the player has reloaded their gun and then in the Weld.C0 = CFrame.new() put the correct cframe in it.

? i dont understand , i cant keep the other cframe as we moved since we reloaded

I’m not too sure, I normally weld the everything in a script so then later I can keep the cframes of the weld to use in a case like yours.

or is there a way i weld a mag and make it invisible when in the gun

If your reloading is an animation, then I would wait until the animation Is done then reweld the mag; and make the mag invisible by setting it’s transparency

or i can just put a mag on my hand (starter char) and make it invisible when not reloading

That would work too, you would just have to position the arm perfectly so the mag fits while keeping a good holding look