Hello! Trying changing the shop button to ImageButton, as ImageLabel doesn’t have the ‘MouseButton1Click’ event attached to it.
Also, here is a more readable version of your code:
local Main = script.Parent.Parent:WaitForChild("Main")
local Button = script.Parent
Button.MouseButton1Click:Connect(function()
Main.Visible = not Main.Visible
end)
MouseButton1Click?
I don’t believe that’s correct.
local Main = script.Parent.Parent:WaitForChild("Main")
local Button = script.Parent
Button.MouseButton1Up:Connect(function()
Main.Visible = not Main.Visible
end)
Yeah, it actually is to detect clicks, the problem is it was a ImageLabel rather than a ImageButton, and ImageLabel’s don’t have a MouseButton1Click event.