Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a Screen GUI appear after clicking on a Surface GUI?

Please help. I have been trying to figure this out all day and still can't get it. Please send feedback immediately.

1 answer

This is how I did it:

Put the SurfaceGUI into your StarterGUI first. Then, put a localscript inside your SurfaceGui.

Inside that localscript, put:

script.Parent.Adornee = game.Workspace:WaitForChild('Part') -- Set the adornee as the part

function onClick() -- Function for the click
game.Players.LocalPlayer:WaitForChild('PlayerGui'):WaitForChild('ScreenGui'):WaitForChild('Frame').Visible = true -- Make the frame inside your GUI visible

script.Parent:WaitForChild('TextButton').MouseButton1Click:connect(onClick) -- Detect the click

You'll need to edit it for the location of your objects, unless you give me the hierarchy.

EDIT: TYPO

This discussion is preserved as it was. New answers, comments, and votes are closed.