Scrolling frame input

I’m using a scrolling frame and using InputBegan and when you click anywhere on screen that’s not the scrolling frame it fires input began and I’m not sure why. I’d like to know why as i can think of how to get around it but I just don’t understand why it does that.

1 Like

UserInputService.InputBegan fires for input no matter if it’s in a scrolling frame, unless you’re talking about a different InputBegan.

For above, I think the OP is talking about GuiObject.InputBegan.

I’m not even sure if GuiObject.InputBegan is meant to detect if the mouse is inside the GuiObject. There might be properties of the ScrollingFrame that alters that too.

I got an alternative, though. You can make a new variable that checks if the mouse is inside the ScrollingFrame. Then, you can set if the mouse is inside the ScrollingFrame by using GuiObject.MouseEnter and GuiObject.MouseLeave.

2 Likes

Use mousebutton1down for clicking on and input ended for when you stop clicking

I figured this is the route I should take to prevent it but still kind of makes no sense that it even operates in such a way.

I just think that it’s an old feature that doesn’t need to be deprecated since it can be used directly instead of having to rely on a service such as UserInputService. Yeah, right. In Roblox API, there are just many that is similar to each other, except that one can be used directly, and one is used through a Roblox service (which offers more features). Sometimes you want to use the service because it offers more functionality or you can just use the function directly without relying on the service. It’s efficiency vs functionality.