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

My Gui Closes but never opens. How can i solve it ?

Asked by 3 years ago
script.Parent.HomeButton.MouseButton1Click:Connect(function()
    if script.Parent.HomeButtonActivated == false then
        print("hi")
        script.Parent.Parent.cancloses.Enabled = true
        script.Parent.HomeButtonActivated.Value = true
    else
        print("hiv")
        local f = script.Parent.HomeButton
        script.Parent.Parent.cancloses.Enabled = false
        script.Parent.HomeButtonActivated.Value = false
    end
end)

I made 2 ScreenGuis which one's name is cancloses . I can close it. but when i try to open... it doesnt open

1 answer

Log in to vote
0
Answered by 3 years ago
local open = false
script.Parent.HomeButton.MouseButton1Click:Connect(function()
    if open == false then
        --open
        open = true
    else
        --close
        open = false
    end
end)
Ad

Answer this question