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

Gui wouldn't open again after the x button is clicked?

Asked by
Rdumb1 4
5 years ago

well could somebody please fix this problem, I didn't know what to do on the script.

Problem: gui for atm system wouldn't activate after I clicked on the x button. The x button is inside a frame which is inside the gui.

    script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Parent.Enabled = false
end)

I know I added the enabled = false but if I did this it would just not work or just break the script and leave the gui on.

if script.Parent.Parent.Parent == false then
    script.Parent.Parent.Parent = true
        end)
0
What is the great grandparent of script? DeceptiveCaster 3761 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

you forgot the .Enabled after the .Parent in the second script.

Also, this should work

script.Parent.MouseButton1Down:connect(function()
    script.Parent.Parent.Parent.Enabled = not script.Parent.Parent.Parent.Enabled
end)
Ad

Answer this question