GUI.Activated is fired after releasing scrolling in scrolling frame

I have some buttons in a scrolling frame.

Button presses are detected with the GUI.Activated event which works on both PC and Mobile.

image

However, on mobile if a user places their finger on top of a button, scrolls the frame with their finger still on the button and then releases their finger, the GUI.Activated event is fired.

How can I only detect buttons being pressed when the user clicks it - not by scrolling with their finger on it?

I’ve tried MouseButton1Click and had the same results.

Fixed by setting the ScrollingFrame ‘Active’ property to true.

Really weird…

1 Like

Because it’s automatically set to active meaning the event shouldn’t be fired because it’s flagged as always activated. While if you have it disabled, then it’s waiting to be activated.

If you read my reply, I set the Scrolling Frame property to active - not the GUI button property which has a very different function.

Because the scrolling frame was overtaking the button. It’s priority based on ZIndex (I think), is what was dominating it, as well as it being the parent of the button.