Right now, GUI objects underneath semi-transparent GUI objects can trigger mouse events (click, hover, etc.) How would I disable this?
Maybe disable the buttons’ scripts?
Is there possibly a better solution? I don’t wanna have to disable/disconnect the scripts every time the menu is opened. At that point I’d rather just hide the sub-menu.
As far as I’m aware theres no better solution, I would just check if that frame is visible in the buttons script and return if it is.
Would be much easier if all your buttons were handled inside a loop (e.g.)
for i,v in buttons:GetChildren() do
if v:IsA("TextButton") or v:IsA("ImageButton") then
v.MouseButton1Down:Connect(function()
if statframe.Visible == true then return end
Yes, there is a hacky way to do it.
Instead of using a semi-transparent Frame for background, use a TextButton with same properties and AutoButtonColor
set to false and Modal
to true. This will block firing click events on buttons behind it. Not sure about MouseEnter and MouseLeave events
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.