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)

2 comments

0

Is there something called "worked" in loading? Is that what you're trying to make visible?

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.