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

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

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.

2 comments

0

Where is the script and GUI located? Is this suppose to be an introduction to a game? I'd like more information, please.

0

the script is local, inside a gui. Its just for like a header, so it scrolls through different texts while playing the game

1 answer

✓ Accepted answer

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

2 comments

0

thanks

0

Nice job, Amputated! Welcome to SH!

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