How to properly apply a hair to the player

Hello, im making a script to change the player hair by a customized hair, im having so many problems on localizing the hair in the player head theres the script i have made

i’ll be showing a video of the localizing problem bellow

local newPlayerHair = game.ReplicatedStorage.Parts.GokuHair:Clone()
	-- Localizing the current player hair --
	local playerHair = getPlayerHair(character:GetChildren())
	-- Destroying the current player hair to replace with my hair acessory --
	playerHair:Destroy()
	
	-- Aplying and localizing the player hair --
	local playerHair2 = getPlayerHair(character:GetChildren())
	local PlayerHair2Mesh = playerHair2.Handle:WaitForChild('Mesh')
	playerHair2.Handle.Position = playerHair2.Handle.Position - Vector3.new(-0.25, -0.25, 0.3)
	playerHair2.Handle.Orientation = playerHair2.Handle.Orientation + Vector3.new(0, 155, 0)
	PlayerHair2Mesh.Scale = Vector3.new(0.07, 0.055, 0.075)
	newPlayerHair.Parent = character

https://developer.roblox.com/en-us/api-reference/function/Humanoid/AddAccessory

If somenone is wondering how to positionate an accessory correctly, just start changing some values like: scale(to fit the accessory correctly on the player), and some of the main rotation positions of a accessory and then adding using the function forummer said above.

imagem_2022-03-02_214903

can you explain this more cleary, im having the same problem

if i remember, you need to change some positions and rotations of the attachment you’re using, just like the scale of the hair, so it fits on the character head

1 Like

Thank you so much, that worked!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.