When you play the game inside Studio, does the hat go to the expected place?
The thing is that Roblox automatically weld the hat Attachment (attachment under “Handle” part) with the attachment with same name in character. If hat’s attachment name is “HatAttachment” it will be automatically welded by the server to characters head.
What I usually do in studio is to manually bring the hat model to head’s position, so it doesn’t get that weird look while editing. But game will fix any miss in position anyways