Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Clicking a text button causes the gui behind it to overlap it?

Asked by 5 years ago
Edited 5 years ago

I have made a little shop button which is simple and opens a frame to buy things but the thing is I whenever I click the button in-game the image behind it overlaps it so I can't click it anymore. Everything is completely perfect except for that.

I have tried to do LayoutOrder which I think means layers, I put on the button's order 1 and the image's order is 0.

First I suspected it was just changing my text whenever I click it but then I looked in my PlayerGui and it showed that the text button was behind the image label. I also tried to fiddle with parent hierarchy and that didn't work to.

I am using the Roundify plugin which rounds gui's corners to make them look better with an image but that image is overlapping my text button.

Here's part of my script responsible for opening the shop:

local function OpenShop() -- ShopFrame is a completely different frame in another ScreenGui
    if ShopFrame.Visible == false then
        ShopFrame.Visible = true 
    else
        ShopOpenButton.Visible = false
    end
end

ShopOpenButton.MouseButton1Click:Connect(OpenShop)

If you can tell me more possible solutions or an alternative please let me know!! thanks for reading.

0
Could you edit your question and show us some code, maybe you're doing something that could cause the layout to move into the wrong order User#834 0 — 5y
0
I'm not sure what piece though? The clicking it? or something else? 123nabilben123 499 — 5y
0
All I have is variables and those lines for the script. 123nabilben123 499 — 5y
1
Try changing the z layer or z index on the GUI (forgot what it’s called) proqrammed 285 — 5y
View all comments (11 more)
0
Thanks I will go try it now! 123nabilben123 499 — 5y
0
Should I change it for the Textbutton or the Roundified image which is overlapping the button? 123nabilben123 499 — 5y
0
Increase the value for whatever you want in front proqrammed 285 — 5y
0
I’m honestly not super good at guis, just think this might help proqrammed 285 — 5y
0
I’m honestly not super good at guis, just think this might help proqrammed 285 — 5y
0
I increased the textbutton's z index but that didn't work and I increased the image's z index and that didn't work :( 123nabilben123 499 — 5y
0
Hmm... this problem is difficult to track down proqrammed 285 — 5y
0
Hmm... this problem is difficult to track down proqrammed 285 — 5y
0
Is it possible the button goes down a layer when it is pressed? proqrammed 285 — 5y
0
I'll check 123nabilben123 499 — 5y
0
Nope the button doesn't go down a layer and the Image doesn't go down or up a layer 123nabilben123 499 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

make sure the text button Z Index is higher

0
I did it the text button z index is 1 but the image's z index is 0 123nabilben123 499 — 5y
Ad

Answer this question