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

Can you tell me what is wrong with this?

Asked by 10 years ago
-- This is inside of a TextBox that is inside of a Frame that is inside of a ScreenGui
local t = script.Parent
    if t.Text = "100%" then
    wait(2)
    t.Parent.Visible = false
    t.Visible = false
end

On line 3 it is underlined with red but I can't figure out what is wrong. Any help? (P.S.) This is for a loading screen so when it says 100% the gui is supposed to close.

2 answers

Log in to vote
0
Answered by 10 years ago
local t = script.Parent
if t.Text == "100%" then --If your using an if loop, make sure to add two ='s if it equals to a value of somesort.
 wait(2)
t.Parent.Visible = false
 t.Visible = false
end
Ad
Log in to vote
-1
Answered by 10 years ago

Try using single quotes instead of double quotes. Or turn the "t.Text = "100%" " to a variable. So if (var) then -->

Answer this question