Okay so basically what im trying to do is https://imgur.com/a/FQV15LH

this is found on the Star Wars Timelines RP game

what I've done is this https://imgur.com/a/nj9Njwe

theres those 3 short longish hairs in the line and that posh looking one is the Main Hair the player touches so they acquire it

Here's the script in the Main Hair

-- (Hat Giver Script - Loaded.)

debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Hair"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1, 1, 2) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
p.BrickColor = script.Parent.BrickColor
		h.Parent = hit.Parent

--by this point I tried to set the position of the sticky out hair that was too far down but it failed

if script.Parent.Mesh.MeshId == "http://www.roblox.com/asset/?id= 346578029"
then h.AttachmentPos = Vector3.new(0, 0.34, -0.002)
end
else



		h.AttachmentPos = Vector3.new(0, 0.28, -0.002)

		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)

So as you can see in this photo the sticky out hair is too far down https://imgur.com/a/J60ah4a

I've tried ways of fixing it like increasing the size of this specific hair and what I did in the script but it always ends up the same?

This is the script inside the hairs you click on to set the Main Hair to that hairpiece/mesh

local hairpiece = script.Parent
local ThisMeshId = script.Parent.MeshId

hairpiece.ClickDetector.MouseClick:Connect(function()
hairpiece.Parent.MainHair.Mesh.MeshId = "http://www.roblox.com/asset/?id= 346578029"
hairpiece.Parent.MainHair.BrickColor = hairpiece.BrickColor
end)

Another thing i'd like to add is when I click on this specific hair that wasnt made by roblox https://imgur.com/a/9CF6iAg

When I click on it it goes to a huge size for some reason and I dont know why, i've tried fixing this inside the script before too https://imgur.com/a/Gc5kILE

For now the only hairpieces that are actually working is the acorn hair and short boy hair

I've tried everything please help?