Sorry for the title, I couldn't figure out anything else to put.

I was creating some clothes (made out of parts) that are welded to the character's parts. Everything else except for the torso is perfect. The torso is rotated 90° to the side, and I cannot figure out a way to fix it. EDIT: The 'MainChest' part is a union

This is a playeradded event, and the game is NOT fe!

This is only the part of the code that does the welding, everything else is irrelevant.

	repeat wait() until plr.Character	
	
	local clothes = game.ReplicatedStorage.Clothing.Starter
	local chest = clothes.Chest:Clone()
	local lefta = clothes.LeftA:Clone()
	local leftl = clothes.LeftL:Clone()
	local righta = clothes.RightA:Clone()
	local rightl = clothes.RightL:Clone()
	
	for i, v in pairs(chest:GetChildren()) do
		if v.Name ~= "MainChest" then
			local weld = Instance.new("Weld", chest.MainChest)
			weld.Part0 = v
			weld.Part1 = chest.MainChest
			weld.C0 = v.CFrame:inverse() * chest.MainChest.CFrame
		end
	end
	
	for i, v in pairs(lefta:GetChildren()) do
		if v.Name ~= "MainLeftA" then
			local weld = Instance.new("Weld", lefta.MainLeftA)
			weld.Part0 = v
			weld.Part1 = lefta.MainLeftA
			weld.C0 = v.CFrame:inverse() * lefta.MainLeftA.CFrame
		end
	end
	
	for i, v in pairs(leftl:GetChildren()) do
		if v.Name ~= "MainLeftL" then
			local weld = Instance.new("Weld", leftl.MainLeftL)
			weld.Part0 = v
			weld.Part1 = leftl.MainLeftL
			weld.C0 = v.CFrame:inverse() * leftl.MainLeftL.CFrame
		end
	end
	
	for i, v in pairs(rightl:GetChildren()) do
		if v.Name ~= "MainRightL" then
			local weld = Instance.new("Weld", rightl.MainRightL)
			weld.Part0 = v
			weld.Part1 = rightl.MainRightL
			weld.C0 = v.CFrame:inverse() * rightl.MainRightL.CFrame
		end
	end
	
	for i, v in pairs(righta:GetChildren()) do
		if v.Name ~= "MainRightA" then
			local weld = Instance.new("Weld", righta.MainRightA)
			weld.Part0 = v
			weld.Part1 = righta.MainRightA
			weld.C0 = v.CFrame:inverse() * righta.MainRightA.CFrame
		end
	end
	
	chest.Parent = plr.Character
	lefta.Parent = plr.Character
	leftl.Parent = plr.Character
	righta.Parent = plr.Character
	rightl.Parent = plr.Character	
	
	local leftaweld = Instance.new("Weld", lefta.MainLeftA)
	leftaweld.Part0 = lefta.MainLeftA
	leftaweld.Part1 = plr.Character["Left Arm"]
	
	local leftlweld = Instance.new("Weld", leftl.MainLeftL)
	leftlweld.Part0 = leftl.MainLeftL
	leftlweld.Part1 = plr.Character["Left Leg"]
	
	local rightaweld = Instance.new("Weld", righta.MainRightA)
	rightaweld.Part0 = righta.MainRightA
	rightaweld.Part1 = plr.Character["Right Arm"]
	
	local rightlweld = Instance.new("Weld", rightl.MainRightL)
	rightlweld.Part0 = rightl.MainRightL
	rightlweld.Part1 = plr.Character["Right Leg"]
	
	local chestweld = Instance.new("Weld", chest.MainChest)
	chestweld.Part0 = chest.MainChest
	chestweld.Part1 = plr.Character.Torso
	
	chest.MainChest.CFrame = plr.Character.Torso.CFrame
	lefta.MainLeftA.CFrame = plr.Character["Left Arm"].CFrame
	leftl.MainLeftL.CFrame = plr.Character["Left Leg"].CFrame
	righta.MainRightA.CFrame = plr.Character["Right Arm"].CFrame
	rightl.MainRightL.CFrame = plr.Character["Right Leg"].CFrame

1 comment

0

after rotating the weld and adjusting it, I fixed it. I will leave this question here just in case someone else has the same problem.