Basicly when you click the arrow it changes your clothing text to what you wanna wear (Already works) but the problem is that for some reason it is not updating correctly, when you click it itis suppost to update your character to what you have. But for some reason it doesn't want to work. Any solutions or fixes? If so why was it doing that.
local player = game.Players.LocalPlayer.Name local Character = game.Workspace[player] function Update() for i,v in pairs(Character:GetChildren()) do if v:IsA("Hat") or v:IsA("Pants") or v:IsA("Shirt") then v:Destroy() end game.ReplicatedStorage.ClothingLow.HatsLow[script.Parent.ItemName.Text]:Clone(Character) end end script.Parent.ItemName.Changed:Connect(Update)
Like what incapaz said, hats were deprecated after the hat customization update when they were replaced by accessories. Instead, do this.
local player = game.Players.LocalPlayer.Name local Character = game.Workspace[player] function Update() for i,v in pairs(Character:GetChildren()) do if v:IsA("Accessory") or v:IsA("Pants") or v:IsA("Shirt") then v:Destroy() end game.ReplicatedStorage.ClothingLow.HatsLow[script.Parent.ItemName.Text]:Clone(Character) end end script.Parent.ItemName.Changed:Connect(Update)