I wrote this code which is supposed to weld a boxing glove to a player’s hands. It’s cloning and getting put into the workspace, but not welding. Can someone please help?
Still not fixed. (30 Characters)
what is the error exactly. share the output. or is it more of a “not welded, falls off” thing?
I would parent the weld first before working with the other properties. Also, you don’t have to make a Character variable using Player when you could connect CharacterAdded to a variable.
use a WeldConstraint:
local weld = Instance.new("WeldConstraint")
weld.Part0 = Character.LeftHand
weld.Part1 = BoxingGloveClone.LeftBoxingGlove
weld.Parent = BoxingGloveClone
they are just so much easier to work with
Do Weld Constraints not have a C0 or C1?
it automatically sets the C0 and C1 to the part0 and part1’s cframes; they make your life so much easier lol
The only catch to using them is you cant adjust the C0 and C1 like in a regular weld, but in this case it doesn’t look like you need to do that.
There isn’t any error. It just clones it and it randomly falls in.
I heard it’s better to parent it AFTER setting the properties.
Ok, I’ll see if that works. (30 Characters)
Also if that doesn’t work, try doing :BreakJoints() on the model before you create the welds
To test if the Player.Character works or not right?
no, i mean on the BoxingGloveClone model
I don’t get it though, why? (30 Characters)
i mean like this:
local BoxingGloveClone = BoxingGloves:Clone()
BoxingGloveClone:BreakJoints()
BoxingGloveClone.Parent = Character
-- then create the welds
I know how to do it, but my question is why do we have to break it’s joints?
I was thinking that maybe there were parts that were initially welded together in the model when you cloned it.
Can you send a picture of the children of the model?
Is it anchored? If it is turn that off. I’m not also sure but you may need to be also position it on the left hand in the script by setting the glove position to the left hand well you weld it
Oh also, I forgot to say, the weld’s do get created, but it doesn’t join the two.