So.. I have made a button(SurfaceGui) and when you click it, a ScreenGui opens. But i'm not sure why its not working.
function wopen() game.StarterGui.ScreenGui.Frame.Visible = true end script.Parent.MouseButton1Click:connect(wopen)
Its not working because the players got playergui.
so u have to go via LocalPlayer.PlayerGui.ScreenGui.Frame.Visible
function wopen() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true end script.Parent.MouseButton1Click:connect(wopen)
it would be easier to just do this.
script.Parent.MouseButton1Click:connect(function() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true end)
it just looks simpler and is easier to understand. :\
Ok, in order to do this, you need to put a SurfaceGui inside of the StarterGui, then insert this script into it:
script.Parent.Adornee = Part --Change this to whatever part in the workspace you want it on.
That will set the SurfaceGui onto the correct block, while also allowing you to access the LocalPlayer.
Now for the next part.
Put a LocalScript inside a TextButton whose parent is the SurfaceGui. Inside that, put this script:
script.Parent.MouseButton1Click:connect(function() game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = true --Gets the LocalPlayer and sets the Frame to visible. end)
This should allow you to open the frame correctly.
If you do this correctly, it should work fine. Anyways, I hope I helped. If you have any further problems or questions please leave a comment below :P