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

I have a loop that is for i=1, 0, -.2 do but it isn't going through the loop like it should, why?

So, I'm trying to make a gui fade in and to do that, I use this script:

for i=1, 0, -.2 do print(i) script.Parent.TextTransparency = i script.Parent.TextStrokeTransparency = i wait(.025) end

The thing is, this script prints out:

1 (x4) 0.8 1 (x4) 0.8 1 (x4) 0.4 1 (x4) 0.8 1 (x4) 0.8 1 (x4) 0.8 1 (x4) 0.8 1 (x4) 0.6 1 (x4) 0.8 1 (x4)

Any ideas of why and how to fix it?

2 comments

0

Your script worked perfectly for me, not sure how your entire thing is set up but you may want to look at your gui values perhaps? Sorry I couldn't help you more.

0

Nvm, realized the there was nothing wrong with the loop, I just accidently activated it multible times

1 answer

men = true

for i=1, 0, -.2 do
if men then
print(i)
script.Parent.TextTransparency = i
script.Parent.TextStrokeTransparency = i
wait(.025)
men = false
end
end

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