Search code examples
luarobloxluau

How would I detect if a GUI touches another GUI?


So, I am trying to make a game based on guis to make it 2D and to have custom sprites, and I want to make bosses that take damage when you shoot them, and how would I do that, due to needing the GUI's to detect when it touches another GUI, all my scripts just break. So, I am trying to detect when a Image(our bullet) touches another Image(our boss) (need images to have custom sprites) Also, I have no code due to have no idea that does work. also, the name of the player frame is obviously well, Player! and the boss, is well Boss.


Solution

  • I've never tried to make a 2D physics-based game, but I have heard good things about jaipack17's Nature2D library (currently v0.7.1). It supports collisions, mass and gravity, touched events, state, etc. so should be most of the framework needed to create the game.