Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

GUI Scripting help?

Asked by
F_lipe 135
10 years ago

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
script.Parent.MouseButton1Down:connect(function() -- stuff end FearMeIAmLag 1161 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

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

script.Parent.MouseButton1Click:connect(function)
0
To clarify this: MouseButton1Click is the correct event, onMouseClick is fine as long as it is defined as a function. Perci1 4988 — 10y
Ad
Log in to vote
3
Answered by 10 years ago

@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)

Answer this question