I have this script right here..
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
for loop = 1,10 do
wait(0.01)
script.Parent.BackgroundTransparency = loop/10
game:GetService("RunService").Stepped:Wait()
end
end)
And it makes a frame's "BackgroundTransparency" go from 1 to 0. But how do I make that go from 0 to 1 and then wait for a few seconds and then from 1 back to 0?
Thanks for your time.

5 comments
u should use tweening and not that loop
you could use a while loop
@tacotown2, Uhhhh... why shouldn't he use a numeric for loop? It's more efficient and he doesn't seem to mind the fade skips.
tweening is probably smoother and it can easily be customized by changing its tweeninfo, also no idea why line 5 is where it is
Listen to taco and Gold.