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 comments
If this doesn't work, please tell me so I can look more in-depth for this.
this doesnt work