I have a weld script inside of a button, when you press the button its supposed to clone the helmet from ReplicatedStorage and weld it to your noggin (head, incase you didnt know what that word it).

But it doesnt weld I dont think, nor does it error.

Heres the code, I am sure its a simple problem.

local function WeldTogether (Part0, Part1, JointType, WeldParent)
	JointType = JointType or "Weld"
		
	local NewWeld = Instance.new(JointType)
	NewWeld.Part0 = Player.Character.Head
	NewWeld.Part1 = ClassItems.Rebels.AssaultClass.Helmet:clone()
	NewWeld.C0 = CFrame.new()
	NewWeld.C1 = Part1.CFrame:toObjectSpace(Part0.CFrame)
	NewWeld.Parent = WeldParent or Part0
		
	return NewWeld
end

Thank you so much for your time, and Merry Christmas :)

I am pretty sure its not even running the fucntion, I put a print above the JointType line and it never printed.

Also the Helmet is more than 1 part, I dont know if that matters.

3 comments

0

If you have FilteringEnabled then when you use a localscript it may not work if you are using a localscript try using regular script or turning off FilteringEnabled

0

I would guess its because you did :clone() when trying to set the Part1.

0

I just decided to use Attachments instead, weld is kinda old for the thing i am trying to do.