Surface GUI Button Not Clickable

I have a simple surface gui on a part with a scrolling frame inside, and the scrolling frame features buttons. The issue I’m having isn’t with the code but it’s with actually clicking the button itself. Some buttons seem to only be clickable in certain places? I’m not sure how to explain really, so I’ve attached a few screenshots below.

This screenshot shows how the buttons should work when you hover over them.
image

This is the issue I’m having, the 2x luck button works perfectly fine whilst this 1x luck button doesn’t.
image
Only hovering in this place does it let me interact
image

Same goes for the 4x luck button
Any ideas on how I can fix this would be greatly appreciated.

4 Likes

Likely due to the GuiObject’s “ZIndex” properties, make sure the GuiButton objects aren’t being overlayed by other GuiObjects.

I had the same issue yesterday. Put the SurfaceGui in StarterGui and make the part the adornee. These scripts don’t seem to work in workspace…

Edit: I think I misunderstood your problem…

Yeah… The scripts are working fine it’s just the buttons are difficult/weird to click.

I changed the ZIndex to a number higher than any other ui component yet I still have the same issue.

Hello, I am not sure if you are still having this problem. But here’s my solution

I fixed mine by scaling the part up and ensuring it was not close to the other part. Even if you see the SurfaceGUI, it should still be blocked by that part; make sure it’s distanced from it.

Note that events for UIObjects are only detected if the objects are children of starterGUI. Just set the SurfaceGUI to StarterGUI and set the “Adornee” property to the instance.