Hello, I’m trying to make a button, but since the button is a image button I put a text label over it. But, since the text label is over the text button the script doesn’t think there is a button under it, so there is not detection. How can I fix this?
You can parent the text label inside the button, or you can set the Zindex to prioritize the button over the label. So, you’d set the Zindex of the text to 2 and it would ignore the text label when layered.
I added a localscript to it and it seems to work properly. I also changed both Zindex back to 1.
Since it is an ImageButton, there will be no visual changes until you add an image. So, if you want to visually see it change, you’d have to add an image or convert it to a TextButton. You can use this plugin to convert it without deleting it:
I tested out your button with a localscript and it’s working fine.
Here’s the script that I added to the ScreenGui: