Weld script doesnt work

So I never used scripting welding but this is my first time. I am trying to weld boots to the player. the boots are 2 models. Left and right. Both have A primary part the size of the leg:

boot
the Handle is the primary part. But I made a script to weld the boots to anybody that joins. But it
doesn’t work. Here is the script:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		local LLeg = char["Left Leg"]
		local RLeg = char["Right Leg"]
		local LBoot = game.ReplicatedStorage.WeldObj.LeftBoot:Clone()
		local RBoot = game.ReplicatedStorage.WeldObj.RightBoot:Clone()
		
		LBoot:SetPrimaryPartCFrame(LLeg.CFrame)
		RBoot:SetPrimaryPartCFrame(RLeg.CFrame)
		
		
		local Lweld = Instance.new("WeldConstraint")
		Lweld.Parent = LLeg
		Lweld.Part0 = LLeg
		Lweld.Part1 = LBoot.PrimaryPart
		
		local Rweld = Instance.new("WeldConstraint")
		Rweld.Parent = RLeg
		Rweld.Part0 = RLeg
		Rweld.Part1 = RBoot.PrimaryPart
		
	end)
end)

But when I test no error is shown. But it doesn’t weld it to me

I think it might be because you forgot to parent the boots.
Try doing

LBoot.Parent = char
RBoot.Parent = char
1 Like

Nvm They were anchored. I unachored them now it works! Thanks