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

Why won't this Gui LocalScript work?

Asked by 10 years ago

So, this script is supposed to do this: 1. wait until a property of 'loading' is changed 2. make a Gui appear 3. if loading is still visible, make it invisible and make the next screen visible (this will be critical eventually! 4. if it is invisible, destroy the script

It works up to step 2, then stops. I don't know why, please help!

player = game.Players.LocalPlayer
gui = player.PlayerGui.ScreenGui
loading = script.Parent
results = gui.results

loading.Changed:connect(function(property)
  local value = loading[property]
    loading.worked.Visible = true
    if loading.Visible == true then
        loading.Visible = false
        results.Visible = true
else
    script:Destroy()
    end
end)
0
Is there something called "worked" in loading? Is that what you're trying to make visible? GoldenPhysics 474 — 10y
0
Yes, that is the first Gui that needs to become visible when the variable is changed- this was mainly so I could test, and that's how I know that the .Changed event isn't the problem. Antharaziia 75 — 10y

Answer this question