MouseButton1Click Not Firing

I have a ImageButton that is supposed to tween something when clicked but unfortunately it does not fire due to there being another fully transparent ImageButton being used (covering the entire screen) so when the player hits a certain key it unlocks their mouse (the game is in first person). The zindex for the ImageButton that is supposed to fire the event is higher than the other ImageButton and i’ve tried setting Active to false on the ImageButton that’s covering the entire screen but that wont work either? Anyone have any solutions?

1 Like

Set the ZIndex/LayoutOrder property of the image button you’re trying to press to something different than that of the image which is covering the entire screen.

https://developer.roblox.com/en-us/api-reference/property/GuiObject/ZIndex
https://developer.roblox.com/en-us/api-reference/property/GuiObject/LayoutOrder

I’ve already done this as seen above ^

Make sure there isn’t a different UI object covering the screen as well which might have a higher ZIndex or LayoutOrder property value.

There is no other UI element covering the screen other than the image button that i’ve mentioned previously

you can try a manual thing with mouseenter and use userinput service
when hovering set a variable to true, and then if you click while true then do the tween
when you leave the hover, set variable to false

1 Like