Right now, this script fades it out... I can't get it to fade in. If someone could help that would be amazing!
for i = 0,.6,0.01 do
script.Parent.Decal.Transparency = i
wait()
end
Right now, this script fades it out... I can't get it to fade in. If someone could help that would be amazing!
for i = 0,.6,0.01 do
script.Parent.Decal.Transparency = i
wait()
end
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
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.
You forgot the number has to be negative
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
You should look into this: https://scriptinghelpers.org/questions/34141/my-part-isnt-going-invisible-and-visible-again#36848