I'm struggling hard at this because I can't know for sure if it gets deleted or not. Sometimes it does, sometimes it don't. Can someone give me a tip about this?
My current script:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
wait(0.5)
for i, v in pairs (char:GetChildren()) do
if v.ClassName == 'Accessory' then
v:Destroy()
end
if v.ClassName == 'Hat' then
v:Destroy()
end
end
end)
end)

3 comments
Thanks!
-1 you should be using https://developer.roblox.com/api-reference/function/Humanoid/RemoveAccessories
That wasn't the question though, or related to the problem. Problem is hats/accessories take a moment to load in.