I like how I'm doing 100% of the work here, and you don't seem to be making any effort to debug or learn how any of the code is actually working.
I have neither the time nor the interest in figuring out exactly why you're actually getting that error, so just band-aid it:
Code:
if BuffButton.timeLeft and BuffButton.StatusBar then