Apply description doesn't apply hats on 2nd try

I’m trying to when I equip a tool the player gets a outfit and when I unequip it it removes the outfit. The problem is when I reequip it again the hats don’t reequip.

--some code 
--Tool gets equipped

local descClone = Humanoid:GetAppliedDescription()

descClone.HatAccessory = "1744246930,1744240420,88885069"
descClone.LeftArm = 1974612625


Humanoid:ApplyDescription(descClone)


--Tool unequipped

for _,v in pairs(Char:GetChildren()) do 
	if v:IsA("Accessory") then 
		if v.Name == "EmporerUniverseCrown" or v.Name == "FedNecklace" then 
			v:Destroy()
		end

	else if v.Name == "SpaceArmor" then 
			v:Destroy()
		end
	end
end

I am not sure the reason why, but it seems destroying the hat will make this happen.

but if you do this to remove it, it seems to work fine.

scClone.HatAccessory = ""
descClone.LeftArm = 0

Humanoid:ApplyDescription(descClone)
1 Like

I don’t want to put hataccessory as nothing because i want to keep the players original hats on. Do you think theirs any other way I could do this

when you do :GetAppliedDescription(), it returns the description instance, so you could do something like

local originalDescription = Humanoid:GetAppliedDescription()

local newDescription = originalDescription:Clone()

newDescription.HatAccessory = "1744246930,1744240420,88885069"
newDescription.LeftArm = 1974612625

Humanoid:ApplyDescription(newDescription)

then to turn the character back

Humanoid:ApplyDescription(originalDescription)
2 Likes