So I have this code inside of my close gui button and I'm not sure why its not working. Any help?

local gui = script.Gui

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

2 comments

0

Is it in a local script?

0

It wasn't but I tried it in one and that didn't work