How can i make Gui touch detection?

Ive tried to do some research about this, but all the things i’ve found dont really apply to this situation

This is a basic image of what i want to happen. Guis dont have a built in touch function, so making a simple touch function wont work. If anyone knows this, i really want to understand why it works so i might ask a few questions regarding code, etc

2 Likes

this module is really useful, i suggest you check it out: [v3.0] GuiCollisionService - Gui collisions done right

1 Like

Thanks! Thats exactly what i needed. The fact that its a module makes it better

Although this is a bit late, could you give me a quick tutorial on how to use the module?

same on how you use every other module, require it, use the stuff in the module. heres the doc of the module, everu function does something, to use them do something like

local module = --require stuff
module:getcoolstuff -- gets the module and uses its function which is getcoolstuff

anyway heres the doc GuiCollisionService/README.md at main · jaipack17/GuiCollisionService · GitHub

1 Like

im sorry that this is VERY late but i cant get the module to work. This is my first time using one so could you give me a quick post on how to get some of it going?

for colliding:

local GuiCollisionService = require(game.ReplicatedStorage.GuiCollisionService)
local instance1 = script.Parent.Frame1 -- example
local instance2 = script.Parent.Collider -- example [Frame]

GuiCollisionService.isColliding(instance1, instance2)-- and do an function if you want it to do something

I would put this script in the gui i want to be something another gui collides with right?