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

I'm Not Sure How I Could Make A Gui, On-Clicked Event Without A Click Detector?

Here's What I Have So Far, Im Not Very Good With Click Detectors

script.Parent.ClickDetector.MouseClick:Connect(onClicked)

1 comment

0

So you want a SurfaceGui on a part that is clickable?

1 answer

✓ Accepted answer

The Gui "Text Buttons" or "Image Buttons" have "Click-Detectors" built-in. You could put this code into a local script in one of the Button types above.

function OnClicked()
	
end
script.Parent.MouseButton1Click:Connect(OnClicked)

2 comments

0

Don't forget to set the SurfaceGui's adornee or else it won't work.

0

Only if you are using a surface Gui /\

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