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)

6 comments
If I helped you and it works for you now please accept my Answer as a Answer it'll Increase my rep and your rep! :D
Attempted to index global value 'keyConnection'
try it now
I edited the script
thanks it worked!
No problem! :D