What Event Should I Use To Make Interactive Surface GUIs?

Quick question. I am bit confused about whether I should use the Activated Event or the MouseButton1Click Event when making clickable Surface GUIs.

Activated
Developer Hub Article
Devforum Reply

MouseButton1ClickDown
Devforum Reply
ScriptingHelpers Post
ScriptingHelpers Post

Questions that would be helpful if answered:

  1. Which one do you prefer?
  2. Which one is better? Why?

The former. Always. The latter, as its name implies, listens for mouse button clicks. With the former you can determine what input was used because Activated event listeners get an InputObject as an argument.

local button = script.Parent
button.Activated:Connect(function(input)
    print(input.UserInputType)
end)
1 Like

I just use Activated with buttons, because it works on all devices, where as MouseButton1ClickDown only works on PC

1 Like

You could put the surface gui into the startergui and then set the adornee to the part you will then get access to all the features that are locked in the startergui.

1 Like