How to make hair weld to the character?

So I need help with the weld, couple of hairs that I have was manually welded, and the other was welded, the method I did is not working at all, and I kind of am stuck, I did look around to what possibilities that I could as an option and that didn’t really result to what I was trying to do.

if Data.Gender.Value == "Male" then
	if Data.Hair.Value >= 1 then
		local Hair = MaleHairs["H" .. Data.Hair.Value]:Clone()
		Hair.Parent = Character
		if Hair.Hair:FindFirstChildOfClass("ManualWeld") then
			Hair.Hair:FindFirstChildOfClass("ManualWeld").Part1 = Character.Head
		elseif Hair.Hair:FindFirstChildOfClass("Weld") then
			Hair.Hair:FindFirstChildOfClass("Weld").Part1 = Character.Head
		end
		Hair.Hair.BrickColor = BrickColor.new(Data.HairColor.Value)
	end
end
	
if Data.Gender.Value == "Female" then
	if Data.Hair.Value >= 1 then
		local Hair = FemaleHairs["H" .. Data.Hair.Value]:Clone()
		Hair.Parent = Character
		if Hair.Hair:FindFirstChildOfClass("ManualWeld") then
			Hair.Hair:FindFirstChildOfClass("ManualWeld").Part1 = Character.Head
		elseif Hair.Hair:FindFirstChildOfClass("Weld") then
			Hair.Hair:FindFirstChildOfClass("Weld").Part1 = Character.Head
		end
		Hair.Hair.BrickCOlor = BrickColor.new(Data.HairColor.Value)
	end
end
1 Like

New solution I found was to do this instead.

if Data.Gender.Value == "Male" then
	if Data.Hair.Value >= 1 then
		local Hair = MaleHairs:FindFirstChild("H" .. Data.Hair.Value):Clone()
		Hair.Parent = Character
		Hair.PrimaryPart.Head.Part1 = Character.Head
		Hair.Hair.BrickColor = BrickColor.new(Data.HairColor.Value)
	end
end
	
if Data.Gender.Value == "Female" then
	if Data.Hair.Value >= 1 then
		local Hair = FemaleHairs:FindFirstChild("H" .. Data.Hair.Value):Clone()
		Hair.Parent = Character
		Hair.PrimaryPart.Head.Part1 = Character.Head
		Hair.Hair.BrickCOlor = BrickColor.new(Data.HairColor.Value)
	end
end
1 Like