✓ Accepted answer
The Problem
If you look at your second for loop, you have 3 parameters:
-The first being the starting value
-The second being the end value
-The third being the increments the for loop steps using
The problem with your values is, your third parameter doesn't actually make sense. If you kept adding 0.01 to 1, you'd end up with 1.01, 1.02, 1.03..... and so on, my point being you'd never arrive at 0.
The solution
All you need to do is change your stepping value to -0.01and remove the minus sign from line 7.
Your script should then function as you want it to.
1 comment
Output? Is it instantly going from invisible to black, or is it not even changing?