Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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?

2 comments

0

If this doesn't work, please tell me so I can look more in-depth for this.

0

this doesnt work

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)
	

2 comments

0

I've tried using that and it's still not working, and yes storegui is a screengui.

0

hmmm...

This discussion is preserved as it was. New answers, comments, and votes are closed.