So I'm trying to make a popup menu button but this script doesn't seem to work!\ I made sure that everything was in the right place as well.
local Button = script.Parent local Frame = script.Parent.Parent.Frame Frame.Visible = false function onClick() if Frame.Visible == false then Frame.Visible = true elseif Frame.Visible == true then Frame.Visible = false end end Button.MouseButton1Click:Connect(onClick)
What's the issues with this script?
I have the Button, Frame and Script all under the ScreenGui. Placed in Starter GUI. Might need to change the variables accordingly
local Gui = script.Parent local Frame = Gui.Frame local Button = Gui.Button local function onClick() if Frame.Visible == true then Frame.Visible = false else Frame.Visible = true end end Button.MouseButton1Click:Connect(onClick)