I am trying to make it so that GUI fades away By Decreasing The Frames Background Transparency
for i= 1, 40 do
BGDecrease = 0.25
Frame.BackgroundTransparency = Frame.BackgroundTransparency - BGDecrease
wait(0.05)
end
I am trying to make it so that GUI fades away By Decreasing The Frames Background Transparency
for i= 1, 40 do
BGDecrease = 0.25
Frame.BackgroundTransparency = Frame.BackgroundTransparency - BGDecrease
wait(0.05)
end
Assuming you've defined 'Frame', it should work; however, I will note - transparency is a value ranging from 0 to 1.
Thus, you could control it via the start and end values in your for loop, as follows:
for i = 0, 1, 0.05 do
Frame.BackgroundTransparency = i
wait()
end
0 is your starting point of course, which would make the frame opaque. 1 is your goal, which is completely transparent and 0.05 is your increment.
Increase the increment for a faster transition, or decrease it for a slower transition.
This would fade your frame out (opaque -> transparent, to get the opposite effect, just invert the start and end values and subtract instead.
for i = 1, 0, -0.05 do
This discussion is preserved as it was. New answers, comments, and votes are closed.