Help Add clothing to Humanoid Character

Hello I am building a game where the character clothing can be swapped.

I am using a humanoid avatar for my character, and I had a 3D artist weight paint the clothing in blender to my rig.

When i change the avatar to generic, the clothing fits and moves around with my character perfectly.

However I need to use a humanoid avatar, This is causing the clothing to not attach properly to the model.

I’ve watched many youtube tutorials and tried different scripts such as

But these are not working for me.

I think this suggest the rig did not conform to mecanim humanoid standards. I not sure best way to resolve that, but if I am right that might help you rephrase your search and find better answer.