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

UI Loading Screen not working. Why?

Asked by 3 years ago

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!

0
By "Moving", are you referring to the "Loading..." text not changing, or are you referring to the gui not deleting itself afterwards? DemGame 271 — 3y
0
I mean meaning that the text is not changing. Ducksneedhelp 129 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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

0
while wait do is a really bad practice Dan_PanMan 227 — 3y
0
sorry, but could you suggest a better method? Gmorcad12345 434 — 3y
Ad

Answer this question