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

Store GUI isn't appearing and not working. How do I Fix?

Asked by 6 years ago
Edited 6 years ago

So I was coding a button that closes and opens a GUI for a store. But while being afk I lost the data and it didn't save due to windows updating my computer randomly.

I tried to recreate the exact code and now I don't know whats wrong with it now.

script.Parent.storegui.Enabled = false

script.Parent.storebutton.store.MouseButton1Down(function()
    if script.Parent.storegui.Enabled == false then
        script.Parent.storegui.Enabled = true
    else
        script.Parent.storegui.Enabled = false
    end
end)

I've tried changing MouseButton1Down to MouseButton1Click, still it doesn't work. I don't think anything is deprecated so yeah.

Can someone tell me the problem? Thanks.

2 answers

Log in to vote
0
Answered by
Fako16 13
6 years ago

I think you should change the 'Enabled' to 'Visible', if this is not the problem, please tell me more about the situation or send me pictures of the properties and stuff. Here's the script that I think should work

script.Parent.storegui.Visible= false

script.Parent.storebutton.store.MouseButton1Down(function()
    if script.Parent.storegui.Visible == false then
        script.Parent.storegui.Visible = true
    else
        script.Parent.storegui.Visible = false
    end
end)

Also, is FE on?

0
If this doesn't work, please tell me so I can look more in-depth for this. Fako16 13 — 6y
0
this doesnt work Automat_io 0 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Use the Player GUI:

local p = game.Players.LocalPlayer
p.PlayerGui.storegui.Enabled = false -- Assuming that storegui is a ScreenGUI
script.Parent.storebutton.store.MouseButton1Down:Connect(function()
    if p.PlayerGui.storegui.Enabled == false then
        p.PlayerGui.storegui.Enabled = true
    else then return end
end)

0
I've tried using that and it's still not working, and yes storegui is a screengui. Automat_io 0 — 6y
0
hmmm... DeceptiveCaster 3761 — 6y

Answer this question