This issue has been plaguing Roblox for ages. MouseLeave doesn’t always fire. Plain and simple.
I am using BillboardGuis here if it matters at all. I am on macOS 10.13.1 using the most recent version of Studio. This happens both in game and in studio.
Repro:
Insert a billboard gui in StarterGui
Adorn it to a Part in workspace
Add a frame in the billboard gui and set it up so it shows up in the render area
Write a script that makes use of MouseEnter and MouseLeave events and then test it
MouseLeave will not always fire when your mouse leaves the frame
I can confirm this is an issue with regular screen guis too. If you move your mouse over any gui button really fast, it will detect when it enters, but not when it leaves (using ol’ good Windows 7).
This has been an issue for years as far as I’m aware. Eventually I just wrote a module that just checks the mouse position on a loop to see when it’s left a gui.
I used to do that as well, but then I heard news of refreshed methods coming soon but it never happened. Making custom detectors for mouse enter/leave for BillboardGui’s seems like something I won’t figure out.