Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Welding accessories makes the hairs look weird..?

I'm making a character editor gui and when you change the accessories, they look too high, or too low.. Here's the function

function changeHair(numeral)
	local clone = repStorage.Accessories.Hair:FindFirstChild("Hair"..numeral):Clone()
	dummy.Humanoid:RemoveAccessories()
	clone.Parent = dummy
	local weld = Instance.new("Weld")
	weld.Part0 = clone.Handle
	weld.Part1 = dummy.Head
	weld.Enabled = true
	weld.Parent = clone.Handle
	folder.Parent.HairType.Value = "Hair"..numeral
end

2 answers

If you add an accessory object to a humanoid rig it will automatically weld properly to the head. So you could do that, or use the C0 and C1 properties of the weld to set the offset manually. See this link.

But if they are Roblox accessories or hats, it may be easier to place them in the humanoid rig rather than welding them.

Hope this helps.

1 comment

0

What I have done is clone the accessory from a folder and put it into the dummy, then weld them. The problem is, when I weld it, it'd too high, or it's phasing through the head. If I don't weld it, it will appear in the workspace. Not on the character.

MK. This script was in a local script, and now I have learnt that you can't weld accessories well in localscripts. Kinda sucks, but I'll have to think of a work around.

This discussion is preserved as it was. New answers, comments, and votes are closed.