I recently came over some strange behavior regarding the function MouseLeave.
Apparently, it will still be active even if I hover over the chat icon, but nothing else.
This is a simple MouseEnter and MouseLeave function, you can see that it works as I hover off the actual object, however when I hover right over to the chat icon, the MouseEnter seems to still be active.
It seems like MouseLeave isn’t firing because you’re entering another GUI button, for example it only stays active when you are hovering over a different button. Make it so that when you touch another GUI button that isn’t your custom button, you make your custom button disabled.
Or just try using wait() at the beginning of your event firing
Moving the button away is a good idea, however for others who don’t want to move it I’ve found an awkward way. When you fire MouseEnter you disable the topbar by using
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("TopbarEnabled", false)
And when you fire MouseLeave use
local StarterGui = game:GetService("StarterGui")
StarterGui:SetCore("TopbarEnabled", true)
it will disable the chat so that you can leave it but it’s kinda unconventional