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

Help with 'for' loops and using in GUI properties?

Asked by 9 years ago
local hudFrame = script.Parent:WaitForChild("HUDFrame")
local hudText = hudFrame:WaitForChild("Text")

while wait() do
    hudText.Text = "Welcome to Laser Warfare Tycoon"
    wait(5)
    for i = 0, 1, 0.2 do
        hudText.TextTransparency = i
    end

    hudText.Text = "Created by NinjoOnline" 
    for i = 1, 0, -0.2 do
        hudText.TextTransparency = i
    end
    wait(5)
end

This all works, no errors. But what I want it to do is say one word, then make the text fade out, then fade back in with a different word. All this does it change the word, it dosen't change the texts transparency.

0
Where is the script and GUI located? Is this suppose to be an introduction to a game? I'd like more information, please. alphawolvess 1784 — 9y
0
the script is local, inside a gui. Its just for like a header, so it scrolls through different texts while playing the game NinjoOnline 1146 — 9y

1 answer

Log in to vote
3
Answered by 9 years ago

You need to put a small wait in the for loop, otherwise it's just doing to go straight to transparency 1/0

0
thanks NinjoOnline 1146 — 9y
0
Nice job, Amputated! Welcome to SH! yumtaste 476 — 9y
Ad

Answer this question