Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make this go the other way with a fade?

2 answers

✓ Accepted answer

To change the outcome of a for loop you can simply switch the first two variables, and then make the third variable negative.

Here is your final script:

for i = .6,0,-0.01 do
    script.Parent.Decal.Transparency = i
    wait()
end

1 comment

0

You will lose precision on an operation like this. In most cases, you should use an integer as your start, step, and destination, and divide your control variable to get the result.

I think you need to switch the first two numbers to fade the other way. Also make the number negative.

for i = .6,0,-0.01 do -- Switch the first two numbers to do the opposite. Also make the number negative.
    script.Parent.Decal.Transparency = i
    wait()

end

Try that and see if it works.

1 comment

0

You forgot the number has to be negative

This discussion is preserved as it was. New answers, comments, and votes are closed.