attiny random delay

trying to implement some timing things with several LEDs and I have tested the code on arduino and it seems to work fine, so I am very confused. I change the pins to go back to my attiny and it seems to not work. no idea why.

const byte fadeUpEvery = 2,
           fadeInSpeed = 5, 
           sampleAmount = 5,
           capacitiveSensorOutput = 2,
           capacitiveSensorInput = 3;

int highLow,
    delayTime,
    numberTimes,
    counter,
    ledNumCount;

int led[] = { 0, 1, 4 };
//int led[] = { 2, 3, 4 };
           
const int delayMin = 4000,
          delayMax = 9000;

void setup(){

   isOn = true;  
   toggleLED = false;
   highLow = LOW;
   counter = 0;
   makeLightningTimer = millis();
   ledNumCount = 0;
   
   for(int i = 0; i < 3; i++){
     pinMode(led[i],OUTPUT);
   }
}

void loop(){ 
     makeLightning();
}

void makeLightning(){
  int delayInterval = random(delayMin,delayMax);
  
  int timeDiff = millis() - makeLightningTimer;
  if( timeDiff >= delayInterval){
    int numberTimes = random(1, 4);
    // normal flicker
    if(counter != fadeUpEvery){
      for(int k = 0; k < numberTimes; k++){
        digitalWrite(led[ledNumCount], LOW);
        delay(500);
        digitalWrite(led[ledNumCount],HIGH);
        delay(500);
        digitalWrite(led[ledNumCount], LOW);
      }
    }
    if(counter == fadeUpEvery){
      counter = 0;
      fade(led[ledNumCount]);
    } 
  } 
  makeLightningTimer = millis();
  counter++;
  ledNumCount++;
  
  if(ledNumCount >= 3) {
     ledNumCount = 0; 
  }
}

this is a trimmed version of the code because the sketch is really big. let me know if it helps to see entire thing. it’s in the makeLightning that the funny business is happening, I am assuming. Been stuck on this on for quite some time now…

on arduino it works fine, attiny it flickers first LED, then stops.

EDIT: figured it out, it has to do with a capacitive sensor I am using with it. its making it do some funny things…?

Thank you for reporting back and actually saying what the issue was. :)