I made a mouseenter and mouseleave function and it doesn't work properly

so I’m making a sound playing system, it works fine but, I’ve made a script that when the cursor hovers (enters) over the “Play” button it makes the size of the button bigger, and when it leaves it resets to its normal size, however, when I move my cursor off the button too quickly, it just freezes there until i bring My cursor a few times more to the button.

here’s a vid
Uploading: bug.mp4…

Support will be appreciated!

Here’s My script for the button:

local button = script.Parent
button:TweenSize(UDim2.new(1, 0,1.807, 0))

button:TweenSize(UDim2.new(1, 0, .9, 0))

That’s pretty normal.
Happened to me too.
This really isn’t a issue with your script, or an error to it.
It’s just roblox itself.

1 Like

And I found out that if you hold on a button and leave its section it just resumes forever and doesn’t stop despite having MouseButtonUp mentioned in the script, I had to do this through mouseleave, is that a bug by the way? the one I asked for help

I mean, it’s pretty normal.
Everyone experiences it somewhat when using mouseenter/mouseleave.
What’s happening is one of the events are not catching up quickly enough.
so what happens is: it freezes until you move your mouse in and out a few times.
I dont know about this though.

In this case, I would say it is a bug, but it probably didn’t catch up fast enough to detect or something like that.

yep… as usual, well, Thank you for letting Me know!