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

How do I use a ClickDetector to make a gui popup?

I want it so if someone clicks a brick, a gui from lighting will popup for the person who clicked the brick...

its simple, but tricky for me

1 answer

✓ Accepted answer

1st, insert a Click Detector 2nd, insert LocalScript 3rd, make sure they're both in the Brick 4th, Type

gui = game.StarterGui.Gui
frame = game.StarterGui.Gui.Frame

OnClicked(function()
if Frame.visible == false then
frame.Visible = true elseif
frame.visible == true then
frame.visible = false

script.Parent.OnClicked.connect:(function)

5th, go to Solo Mode by pressing F6 and click View on top, then select Output then observe your Results.

That's all... By the way, sorry if this doesn't work, cos I think I might have misplaced the OnClicked. Anyway, I hope I helped.

7 comments

0

by the way, you said Lighting, it doesn't need to be from Lighting, just set the Frame of the Gui 'visible' to False

0

It didnt work but it gave me an idea on how to fix it, thanks!

0

The event should be script.Parent.ClickDetector.MouseClick:connect(onClicked)

0

NP iiparty, sorry that I did it a lil wrong though, glad I helped though :D

1

such bad code, much sad

0

shut your mouth zMatrix! I'd like to see you script when you were a Noob (Not that you have stopped being a Noob)

0

You disregarded the request of using Lighting. And you called the function incorrectly.

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