It's supposed to remove shirts, pants and hat of player! Please help.

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
	local Char = character:GetChildren()
	for i = 1, #Char do
		if Char[i].ClassName == "Accessory" or  Char[i].ClassName == "Shirt" or  Char[i].ClassName == "Pants" then
			 Char[i]:Remove()
		end
	end
	end)
end)
    
   

1 comment

3

This is likely running before the shirts, pants, and hats have finished loading in.