For some reason it only works once? If the character dies, it just doesn’t work anymore.
local StandardShirt = {ClothingFolderEly:WaitForChild("ElyStanCollar"), ClothingFolderEly:WaitForChild("ElyStanShirt"), ClothingFolderEly:WaitForChild("ElyStanPantsWaist"),
ClothingFolderEly:WaitForChild("ElyStanRSleeve"), ClothingFolderEly:WaitForChild("ElyStanLSleeve"), ClothingFolderEly:WaitForChild("ElyStanLShoulder"),
ClothingFolderEly:WaitForChild("ElyStanRShoulder")}
GiveClothingEvent.OnServerEvent:Connect(function(Player)
local ClonedShirt = table.clone(StandardShirt)
for i,v in pairs(ClonedShirt) do
Player.Character.Humanoid:AddAccessory(v)
end
end)
I also had something setting the StandardShirt.Archivable = true, but I can’t remember why I wrote that in. Once I removed it, everything worked once before just breaking.
You are only cloning the table that references the shirt parts, not cloning the parts themselves. That’s why it only works once, it’s still using the original shirt parts and not cloning the parts individually. This revised code should work:
local StandardShirt = {ClothingFolderEly:WaitForChild("ElyStanCollar"), ClothingFolderEly:WaitForChild("ElyStanShirt"), ClothingFolderEly:WaitForChild("ElyStanPantsWaist"),
ClothingFolderEly:WaitForChild("ElyStanRSleeve"), ClothingFolderEly:WaitForChild("ElyStanLSleeve"), ClothingFolderEly:WaitForChild("ElyStanLShoulder"),
ClothingFolderEly:WaitForChild("ElyStanRShoulder")}
GiveClothingEvent.OnServerEvent:Connect(function(Player)
for i,v in pairs(StandardShirt) do
Player.Character.Humanoid:AddAccessory(v:Clone())
end
end)