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

UI Loading Screen not working. Why?

Hey there, I was working with making a UI loading screen when the text should move, but when I did it, the text was not moving. Here is all the code:


local LoadingGui = script.Parent.Parent.Parent:WaitForChild("LoadingGui")
local LoadingFrame = script.Parent.Parent:WaitForChild("LoadingFrame")
local LoadingText = script.Parent:WaitForChild("LoadingText")

while true do
	LoadingText.Text = "Loading."
	wait(1)
	LoadingText.Text = "Loading.."
	wait(1)
	LoadingText.Text = "Loading..."
	wait(1)
	LoadingText.Text = "Loading"
end

wait(10)

LoadingGui:Destroy

I don't know why it did not work, but help would be highly appreciated.

Thank you!

2 comments

0

By "Moving", are you referring to the "Loading..." text not changing, or are you referring to the gui not deleting itself afterwards?

0

I mean meaning that the text is not changing.

1 answer

At line 17, use Destroy() not just Destroy or else it won't work

It would be good to use ~~~~~~~~~~~~~~~~~ while wait(1) do

in line 5

if it still doesn't work, send any error messages you had

2 comments

0

while wait do is a really bad practice

0

sorry, but could you suggest a better method?

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