My Gui works only in roblox studio,but he don't work in roblox.
local frame = script.Parent.Parent.Box local OpenClose = script.Parent.Parent.Open local OpenClose = false script.Parent.MouseButton1Down:connect(function(Open) if OpenClose == false then frame.Visible = true OpenClose = true elseif OpenClose == true then frame.Visible = false OpenClose = false end end)
So, this is code for some gui, when I test it it runs fine. But when I use regular servers outside of studio it doesn't work. I'm also try to use thus code
local frame = script.Parent.Parent.Parent:WaitForChild("Box") script.Parent.MouseButton1Click:connect(function() frame.Visible = not frame.Visible end)
but this also doesn't work.
Try this local script (be sure it's a local script and not a normal script):
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Visible = not script.Parent.Parent.Parent.Visible end)
It should work, I haven't tested it out.