So I was making buttons for my menu and I noticed if a player hovers over the button and leaves it fast enough or presses esc it still shows the full text this is the script...
function Enter()
script.Parent.Parent.Parent.CharacterButton.HoverFrame.Visible=false
script.Parent.Parent.Parent.FamiliarButton.HoverFrame.Visible=false
script.Parent.Parent.Parent.BagButton.HoverFrame.Visible=false
script.Parent.Parent:TweenSize(UDim2.new(0,173,0,75),"Out","Quad",0.25,true)
script.Parent.Parent:TweenPosition(UDim2.new(0,-98,0.5,-37),"Out","Quad",0.25,true)
wait()
script.Parent.Parent.Text="Menu"
end
function Leave()
wait()
script.Parent.Parent.Text="E"
wait()
script.Parent.Parent:TweenSize(UDim2.new(0,75,0,75),"Out","Quad",0.25,true)
script.Parent.Parent:TweenPosition(UDim2.new(0,0,0.5,-37),"Out","Quad",0.25,true)
wait()
script.Parent.Parent.Parent.CharacterButton.HoverFrame.Visible=true
script.Parent.Parent.Parent.FamiliarButton.HoverFrame.Visible=true
script.Parent.Parent.Parent.BagButton.HoverFrame.Visible=true
wait()
if not script.Parent.Parent.Text=="E"then
script.Parent.Parent.Text="E"
end
end
script.Parent.MouseEnter:connect(Enter)
script.Parent.MouseLeave:connect(Leave)
I have the script in a FrameGui inside the button so that when a player clicks on the button it does not count it as them leaving the gui.

4 comments
What do you mean? How will that help?
Because you are making the script and because of this, let's say the Enter function is running, and with your waits it's taking much longer then usual and while the Enter function is running the Leave function is suddenly run at the same time it won't really work will it?
Are you saying that I should make the Enter fast enough to end before the player leaves so that both the Enter and Leave can work without trying to run over the other?
Yes.