Did you assign the correct material order in the .lua? The order is (seemingly randomly) different for every model and may change when you make changes to the body. Here’s a guide to get it right: [GUIDE] Getting the material order right
The number of materials in the .lua file has to match the number of (sub)materials you use on the max file.
Usually when I had this come up, the reason was a typo in the .lua file.