I have this script, and it works fine, but when I hover over it too quickly, it stays on mouseEnter until I put my mouse on it again to fix it. Any help?
framebutton.MouseEnter:connect(function() active = true local keyConnection = framebutton.MouseLeave:connect(function() open:TweenPosition(UDim2.new(-0.07,0,0.51,0),EasingDirection,EasingStyle,float) active = false end) open:TweenPosition(UDim2.new(-0.05,0,0.51,0),EasingDirection,EasingStyle,float) repeat wait () until active == false keyConnection:disconnect() end)
It looks like the MouseLeave function is under the same function for MouseEnter
Try this for the script
framebutton.MouseEnter:connect(function() active = true open:TweenPosition(UDim2.new(-0.07,0,0.51,0),EasingDirection,EasingStyle,float) end) framebutton.MouseLeave:connect(function() active = false open:TweenPosition(UDim2.new(-0.05,0,0.51,0),EasingDirection,EasingStyle,float) end)
that should fix the issue hope I helped! :D