So I have been trying to create buttons that will tween their size outwards when you hover your mouse over them. I have been trying to use MouseEnter() and MouseLeave() to do this, but when I move my mouse quickly, it doesn’t detect mouseleave, and the buttons stay the same size instead of shrinking back to normal.
Is there a more reliable method than MouseEnter() and MouseLeave() to accomplish this? Or is it a problem with TweenSize(), and should I use TweenService instead?
I have a feeling this is an easy fix, but I am having some trouble with it. Any help is appreciated.
The old tween methods have an override parameter that allows an in-progress tween to be overridden by another tween on the same object. I believe that is the core issue here.
These methods are deprecated, so you should prefer TweenService, which overrides tweens by default.
MouseEnter and MouseLeave have been historically unreliable. I have a simple workaround described here.
I don’t think this comes down to being unreliable. This is more of a keeping the calls generic. It would be easy enough for Roblox to create commands for this that are rock solid but, that would take away from processor time and resources. Same goes for touch. They are made purposely to be generic and optimized. So they do seem to act a bit odd. Unless you consider this point.