I was testing my game in solo mode and it was working perfectly, but when a friend tested it in multi player mode the gui would not close a am a little confused. here is the code: (Note it has been edited, but it still does not work)
local mainFrame = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame
local scrollFrame = game.Players.LocalPlayer.PlayerGui.ScreenGui.ScrollingFrame
local closeScreen = game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.closeScreen
function closeGUI()
mainFrame.Visible = false --when these are closed everything inside it will close
scrollFrame.Visible = false
end
closeScreen.MouseButton1Click:connect(closeGUI)

3 comments
that was how I was connecting to frame, but I should of did "script.Parent.Parent" and so on and it is a local script
I would say instead of all this "script.Parent" business just use game.Players.LocalPlayer.PlayerGui.Frame;
It still is not working