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)
