Why’re you guys spoon feeding code with no after-explanation as to what was changed or giving him learning resources? There’s no point if OP doesn’t learn.
One thing I’ve noticed, first off: your code block hasn’t been formatted properly. When posting code to the DevForum, put your code between a code block. You can create that by using three back ticks.
– Your code
Next thing I noticed is, well, the code itself. Here are some issues I’ve observed with it:
- You are using an unnecessary wait statement to reinvent the wheel, where functions are already provided for you. You can change this to use CharacterAppearanceLoaded and wait until the signal is fired, which tells the script that the avatar’s assets have loaded. On the other hand, since this doesn’t fire for blank characters, you can use ChildAdded and destroy CharacterMesh class children when they’re added.
- You’re using the wrong type of for loop; try using a key-value loop instead of via index (since the index is unimportant) 
- Try indexing your services as a local variable at the top of your script first, via GetService (GetService is a canonical way of fetching services)
- You can use the HumanoidDescription system to preserve a certain style for the avatar to look, by applying a 0 value for each limb; you can then apply this HumanoidDescription to the character via a script in StarterCharacterScripts
for _, object in pairs(Character:GetChildren()) do
print(object, object.ClassName) -- Replace with your own code