may i make a suggestion
if you want to handle a bunch of colors without having to create like 20 different datablocks each time, you should use the bot > mountobject method instead. name the parts you want to color as node names and then make it into a bot datablock. this way you can mount it to the player's head and have them decide the exact colors they want or you can decide through setNodeColor();
it's really efficient and you can essentially choose the exact color of each part if you want. it just requires like 60 extra lines of code