The title explains it all, but if you want more detail, like pong. When the ball hits one of the paddles, the ball will flip. Does anyone know how I can do this in Roblox?
How can I make it so when a gui object touches another gui object it does a function?
2 answers
You can check their positions, a touched event for GUIs doesn't exist.
What you need is 2D collision detection (SAT) which Roblox doesn't provide but luckily for you it's so easy to understand and implement.
Try finding your own sources but here are two for now: https://learnopengl.com/In-Practice/2D-Game/Collisions/Collision-detection
And of course, our fav developer (or at least mine lol): www.youtube.com/watch?v=IELWpIGtjRg
Hope this helped and good luck :D
6 comments
This doesn't work anymore, do you have a link to up to date video?
wdym? The link is up to date. I will update it so it's clickable
I believe it's also called AABB. so if you want to find the sources you prefer
No, the script doesn't work.
did you just copy the whole thing from the video? You are supposed to understand how you do it and then you will very easily be able to. I think it should work though
I did, it didn't work.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Okay, thank you.