I may have figured something out. The script works fine with one color, but when I add another line, that’s when it breaks. Here’s the whole script. Maybe you can find out where I went wrong?
slider = Math.round(thisComp.layer(“Color”).effect(“Slider Control”)(“Slider”));
colorValue1 = thisComp.layer(“Color”).effect(“Color Control”)(“Color”);
colorValue2 = thisComp.layer(“Color”).effect(“Color Control 2”)(“Color”);
colorValue3 = thisComp.layer(“Color”).effect(“Color Control 3”)(“Color”);
colorValue4 = thisComp.layer(“Color”).effect(“Color Control 4”)(“Color”);
colorValue5 = thisComp.layer(“Color”).effect(“Color Control 5”)(“Color”);
colorValue6 = thisComp.layer(“Color”).effect(“Color Control 6”)(“Color”);
colorValue7 = thisComp.layer(“Color”).effect(“Color Control 7”)(“Color”);
colorValue8 = thisComp.layer(“Color”).effect(“Color Control 8”)(“Color”);
colorValue9 = thisComp.layer(“Color”).effect(“Color Control 9”)(“Color”);
colorValue10 = thisComp.layer(“Color”).effect(“Color Control 10”)(“Color”);
colorValue11 = thisComp.layer(“Color”).effect(“Color Control 11”)(“Color”);
colorValue12 = thisComp.layer(“Color”).effect(“Color Control 12”)(“Color”);
colorValue13 = thisComp.layer(“Color”).effect(“Color Control 13”)(“Color”);
if(slider==1){colorValue1};
if(slider==2){colorValue2};
if(slider==3){colorValue3};
if(slider==4){colorValue4};
if(slider==5){colorValue5};
if(slider==6){colorValue6};
if(slider==7){colorValue7};
if(slider==8){colorValue8};
if(slider==9){colorValue9};
if(slider==10){colorValue10};
if(slider==11){colorValue11};
if(slider==12){colorValue12};
if(slider==13){colorValue13};