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

GUI Scripting help?

Would mouseclick work with GUI's?

Example:

script.Parent.MouseClick:connect(onMouseClick)

If not what function do I use for click detectors on GUI's

Sorry I haven't really ever scripted gui's.

1 comment

1

script.Parent.MouseButton1Down:connect(function() -- stuff end

2 answers

✓ Accepted answer

You were almost there, just take out the "onMouseClick"

script.Parent.MouseButton1Click:connect(function)

1 comment

0

To clarify this: MouseButton1Click is the correct event, onMouseClick is fine as long as it is defined as a function.

@RRCT

I doesn't matter if you take out the onMouseClick or not, just make sure to define the function onMouseClick or use :connect(function()) end)

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