My code is here:
function opengui()
local plr = game.Players.LocalPlayer
function opengui()
local shopgui = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("ShopGui")
local guiclone = shopgui:Clone()
guiclone.Parent = plr.StarterGui
end
end
script.Parent.Start.MouseButton1Click:connect(opengui)
It should open shopgui, but just doesn't. It's in a localscript.
Edit: I should probably mention that the GUI being clicked is a SurfaceGUI and the GUI being opened is a ScreenGUI.
Edit 2: I butchered this so bad. Going to sleep. Still doesn't work with the following code:
local plr = game.Players.LocalPlayer
function opengui()
local shopgui = script.Parent.Parent.Parent.Parent.Parent:FindFirstChild("ShopGui")
local guiclone = shopgui:Clone()
guiclone.Parent = plr.PlayerGui
end
script.Parent.Start.MouseButton1Click:connect(opengui)

3 comments
Oh my god, thanks. I totally butchered that code. Better get some sleep.
Wait, no, doesn't work. :(
did you make sure that you call the hierarchy correctly? Also, I use MouseButton1Down, I'm not sure what the difference is.