How can i make a touched event for a 2d Frame?

im trying to recreate scartches drag and drop coding but i have no idea how to make a touch event for a 2d frame if you know please tell me Thanks!

you can drag and build blocks to make different scripts if you want to see my gui here it is


its not gonna be there for long im planning on adding better art soon

``You would use MouseEnter and MouseLeave (Sort of like Touched and TouchEnded)

You could use BasePlayerGui:GetGuiObjectsAtPosition.

When using that, I would use a point slightly above the top middle of the UI.

If I were programming it, I would probably program the collisions from scratch using manual collision checks, though using the built in point check is still perfectly fine.

Edit:

Ah I thought you meant for linking. For dragging I would use InputBegan, InputChanged, and InputEnded (for mouse + touch inputs). Use InputBegan to start a drag, InputChanged to detect mouse movement, and InputEnded to know when to end the drag.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.