Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

best efficient way to fade a frame gui peformance wise?

Asked by 4 years ago

hello i'm wondering whats the best way to fade a gui i know 2 ways to do it but i feel like one is more efficient

for i = 1,100 do
script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency - 0.01
wait(0.010)
end

or

repeat
script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency - 0.01
wait()
until
script.Parent.BackgroundTransparency = 0

my guess is for do loop since it's so customizable but repeat could be better peformance wise

1 answer

Log in to vote
0
Answered by 4 years ago

Do the repeat one , it's more efficient.

Ad

Answer this question