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

I Need Help With TextTransparency Does It Still Work?

I encountered a problem while creating an intro gui. When I tried to make the text fade away, it didn't work.

Script:

script.Parent.BackgroundTransparency = 0
wait(3)
--this part works its just a black screen fading
function fade()
	for i=1,100 do
		script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 0.01
		wait(0.01)
	end
end
--this part is broken
function textfade()
	for i=1,100 do
		script.Parent.Stuff.Name.TextTransparency = script.Parent.Stuff.Name.TextTransparency + 0.01
		wait(0.01)
	end
end

fade()
textfade()

1 answer

I'm pretty sure the reason why the last part is broken is because your using + 0.01 instead of - 0.01. Also, I don't think you need both of the for loops in functions. Also, I think it'll work better if you use wait() instead of wait(0.01). Here is your script that I corrected, but I did not test it:

script.Parent.BackgroundTransparency = 0
wait(3)
--fade in
    for i=1,100 do
        script.Parent.BackgroundTransparency = script.Parent.BackgroundTransparency + 0.01
        wait()
    end
wait(3)
--fade out
    for i=1,100 do
        script.Parent.Stuff.Name.TextTransparency = script.Parent.Stuff.Name.TextTransparency - 0.01
        wait()
    end

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