sorry! I wasn’t sure how to keep the format since I’ve just made an account but maybe it’s easier to understand now. I’m not sure how to fix my ‘if’ statement because to my understanding, the value of t would keep adding until it reaches 255, and will start to decrease once it hits over 255. I’m not sure if there’s anything wrong with that logic, so maybe you could help me check over my line of thinking?
Why the text couldnt fade out is caused by if else logic.
When t reached 256 (t > 255), it will back to 255 and then it will be back again to 256, because it does qualified to enter the else part where the t should be greater than 255. When t is 255 it enters if part rather than else part
So after the text faded in, it will be back and forth between 255 and 256.