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

What is the command when u click on a screengui?

Asked by 9 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

Help pls ty ".

0
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. FearMeIAmLag 1161 — 9y

2 answers

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

There are two events that can do this;

Ad
Log in to vote
0
Answered by 9 years ago

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.

Answer this question