Going through my scripts and found some code that bothered me

I was going through my scripts and realized, I scripted some GUI button on a surface GUI so when they were activated they would do something. But instead of using “MouseButton1Click”
as the event I used “Activated”. Should I replace this or do I keep it as how it is? Honestly I don’t see the difference.

Here’s a similar post:

For some reason, MouseButton1Click will not work on mobile but MouseButton1Down & MouseButton1Up will, so you should probably change it to those

I don’t get it, so “Activated” does not work on scrolling frames? Or else im guessing they are the same thing.

I mean I don’t know much about Activated, but I’m assuming that it’s basically a support for all button interactions

For the reason why the event doesn’t work on scrolling frames I have no idea why, but I’m assuming it’s just an alternate or something

1 Like

From my understanding, the Activated event works in relatively the same way as MouseButton1Click, except it only works if the GuiObject’s Active property is enabled.

I use the Activated event for the vast majority of GuiObjects & I haven’t experienced any issues with it when the GuiObject is in a ScrollingFrame.


Extra Resources

MouseButton1Up Event - Developer Hub Page

MouseButton1Down Event - Developer Hub Page