Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Gui does not close in multi player mode?

Asked by 10 years ago

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)

1 answer

Log in to vote
0
Answered by 10 years ago

What is script.Parent.Parent.Parent.Frame and all that? Also is this in a localscript or a server script.

0
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 CaptainRuno 40 — 10y
0
I would say instead of all this "script.Parent" business just use game.Players.LocalPlayer.PlayerGui.Frame; PiggyJingles 358 — 10y
0
It still is not working CaptainRuno 40 — 10y
Ad

Answer this question