Help pls ty ".
✓ ANSWER ACCEPTED
What is the command when u click on a screengui?
2 answers
✓ Accepted answer
There are two events that can do this;
-
Fired when the left mouse button is pressed down
-
Fired when the left mouse button is fully clicked(pressed and released)
This is the script you're looking for:
function onClicked(mouse)
print ("Hello World") -- Replace this to what you want your script to do
end
script.Parent.MouseButton1Click:connect(onClicked)
As Goulstem said, on the last line, you can replace the "MouseButton1Click" to "MouseButton1Down" if you want.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
A ScreenGui object cannot be clicked but a TextButton or TextBox object can. I'm not sure if you were asking for just the ScreenGui object or just screen uis in general.