Buttons can be clicked when a frame is over that button

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m trying to make a profile systems with buttons, but my issue is not letting me to do it.

  2. What is the issue? Include screenshots / videos if possible!
    When I click the button it works, but if a frame is over that button it can still be clickeable and I dont want that.
    robloxapp-20200823-1947565.wmv (232.0 KB)

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried to change the Active property to false.

1 Like

Have you tried setting the .Active property of the blocking frame to true, and the Button’s .Active to false?

1 Like

I set it to true in the blocking frame and the button to false and it didn’t work…

Could I see a screenshot of your setup? I unfortunately can’t view the .wav, since I am on a Android device at the moment.

I’m not really sure of any other way to prevent the triggering of Buttons, through their properties. However, you could call GetGuiObjectsAtPosition when the Button is clicked, and then check what it returns, to make sure no guis overlap the Button.

Basically, you could check the table of objects it returns, for elements with a higher zindex than the button. If you find any elements of higher priority, disregard the Button click.

The strange thing is, that you shouldn’t need to make so much of an effort. I’m sure there must be a better way.

I see what your saying now. Set the “Active” property of the frame to false and your problem should be solved. If for whatever reason that isn’t working, there must be another problem with the setup.

And do I set the button property .Active to true or false?

The button should remain true. Think of active as another way of saying “WillDetectMouseClicks” and “WillLetMouseClickPassThrough”

1 Like

It’s still not working, the button can be clicked.

Can you send me a screenshot of the frames properties? Specifically the bool ones. As well as a screenshot of the explorer.

1 Like

I’m not actually sure if .Active is the correct property. I might just be mixed up, but the developer hub page on the .Active property, says that it only blocks input into 3d objects.

I may have to take this back, as other users seem to be using it for this purpose.

1 Like

You could simply set the button’s visibility to false when the frame is open and vice versa.

1 Like

Wait, I had the AutoButtonColor active, and in the documentation says this:

(GuiButton.AutoButtonColor will still work for those as well)

So, let me make a script that will print “Hello” when the button was clicked.

Problem is, frame covers half the button and he only wants the visible half to be clickable.

1 Like

It didn’t work… Maybe another solution?

Can I see a picture of this configuration?

1 Like

You can see the configurations above.

Is that true? I don’t see where it’s indicated. But in that case, you might as well have two separate parts of the frame.

1 Like

Uhhh, is this a roblox bug or there’s a solution for this?

Don’t think its a bug, I just think we dont know what were doing. Im going to do some skimming to see if Ican find anything else

1 Like