Attaching hair on the client, when positioning it creates an offset but it works fine in the server side

Hello! Currently, I am working on a character customization UI however, I ran into a problem. At first, I want to let the player Customize it through the client, and once the player has finalized their options information will be sent to the server and build their body. However, the hair position is different from the server to the client. I want the client to create a preview, but it doesn’t look well because the position of the hair has a gap when done on the local side.

Here is the code I used to attach the hair in both client and server.

view source

01 local Hum = workspace.CustomRig.Humanoid

02 local Hair = game.ReplicatedFirst.Hair:Clone()

03

04 --local Hair = game.workspace.Hair:Clone()

05 local Head = workspace.CustomRig.Head

06 Hair.Parent = workspace

07

08 Hum:AddAccessory(Hair)

09 Hair.AttachmentPoint = workspace.CustomRig.Head.HairAttachment.CFrame

10 Hair.Handle.CFrame = workspace.CustomRig.Head.HairAttachment.WorldCFrame

11

12 local Weld = Instance.new( "WeldConstraint" , Hair)

13 Weld.Part 0 = Head

14 Weld.Part 1 = Hair.Handle

15 Weld.Parent = Hair

Here is the difference:

First Is client

https://gyazo.com/58bffb2d7e4c815e6439cec4bd21b924

Second is Server

https://gyazo.com/68fd796c022842993545d68181ede922

Thank you!

local Hum = workspace.CustomRig.Humanoid
local Hair = game.ReplicatedFirst.Hair:Clone()

--local Hair = game.workspace.Hair:Clone()
local Head = workspace.CustomRig.Head
Hair.Parent = workspace 

Hum:AddAccessory(Hair)
Hair.AttachmentPoint = workspace.CustomRig.Head.HairAttachment.CFrame
Hair.Handle.CFrame = workspace.CustomRig.Head.HairAttachment.WorldCFrame 

local Weld = Instance.new("WeldConstraint", Hair)
Weld.Part0 = Head 
Weld.Part1 = Hair.Handle
Weld.Parent = Hair