Need help, Hats will only align with one character

So im making a game were you play as dogs, and you can choose wich one you play as.
Players also have the option to equip hats to customize your character.



The problem is when you play as other characters, the hats do not align properly with the head.
Is there any way to resolve this issue?

Are you using welds to make the hat stick on the character? If so then change the position of the weld via C0 or C1.

no i am using the accessory object for the hats like a normal character

Then set the CFrame of the hat(accessory).

Try to move the animal’s head in the direction you want based on where you want it. (before you do this make a duplicate of them just incase it doesn’t work.)

Is there a way to make the hats align properly with the head of other characters?
Here is the code I have so far
I have not added the player animation code, but I am pretty sure that it is not the issue,

PlayerGui = game.Players.LocalPlayer:WaitForChild(“PlayerGui”)
–HAT
local hat = Instance.new(“Model”)
hat.Parent = PlayerGui
hat.Name = “Hat”

local hat1 = Instance.new(“Part”)
hat1.Name = “Hat”
hat1.Parent = hat
hat1.CanCollide = false
hat1.BrickColor = BrickColor.new(“Dark stone grey”)
hat1.Transparency = 0
hat1.Size = Vector3.new(1,1,1)
hat1.Anchored = true
hat1.CFrame = CFrame.new(0,0,0)
hat1.Name = “Hat”

local hat2 = Instance.new(“SpecialMesh”)
hat2.Parent = hat1
hat2.MeshId = “http://www.roblox.com/asset/?id=144103762
hat2.Scale = Vector3.new(0.5,0.5,0.5)

local hat3 = Instance.new(“Part”)
hat3.Name = “Hat2”
hat3.Parent = hat
hat3.CanCollide = false
hat3.BrickColor = BrickColor.new(“Dark stone grey”)
hat3.Transparency = 0
hat3.Size = Vector3.new(1,1,1)
hat3.Anchored = true
hat3.CFrame = CFrame.new(0,0,0)
hat3.Name = “Hat2”

local hat4 = Instance.new(“SpecialMesh”)
hat4.Parent = hat3
hat4.MeshId = “http://www.roblox.com/asset/?id=144103762
hat4.Scale = Vector3.new(0.5,0.5,0.5)

local hat5 = Instance.new(“Part”)
hat5.Name