I'm having trouble getting my playergui to open when i click on my surfacegui, which is supposed to open it. The surfacegui is a textbutton, and the gui is a screengui.
The script is below:
function onclick(player) local GUI = script.Parent.ScreensGUI:clone() GUI.Parent = player.WaitForChild("PlayerGui") end script.Parent.MouseButton1Click:connect(onclick)
SurfaceGui
s don't know who clicked them (if the scripts even work at all - but even then you should not use server scripts for input).
Put the GUI in StarterGui and set its Adornee (you may have to do that through a script), then you can properly receive input.