Hats not positioned correctly when cloned into NPC via script

This is what happens when I clone a hat stored in ReplicatedStorage into an NPC, it is positioned in the wrong place.


If I do it manually via studio it positions fine, can anyone help?

2 Likes

I can’t reproduce this. Can you show your code?

This is what I’m doing:

local InsertService = game:GetService("InsertService")
local WorkspaceService = game:GetService("Workspace")

local AssetId = 151784320

local Asset = InsertService:LoadAsset(AssetId):GetChildren()[1]
local Dummy = WorkspaceService.Dummy

Dummy.Humanoid:AddAccessory(Asset)

image

2 Likes
local storage = game:GetService("ReplicatedStorage"):WaitForChild("CharCreate")
local model = game.Workspace:FindFirstChild("CharCreate").Char

	local new = storage:FindFirstChild(change)[charoptions["Gender"][script.Parent.Gender.Choice.Value]][option]:Clone()
	model.Humanoid:AddAccessory(new)
	new.Name = change

I think we are having the same problem.

Some old hats tend to work, but if you try with new hats especially UGC it will position wrong