In this script I have a GUI grow when its hovered over and when its not hovered it shrinks. I think there is glitch is that sometimes the the mouse will glitch the GUI so it doesn't grow or doesn't go shrink back to its original state. Is there a fix?
local AboutParent = script.Parent
--[[Open Script]]--
AboutParent.MouseButton1Click:connect(function()
AboutParent.Parent.AboutFrame.Visible = true
AboutParent.Parent.AboutFrame:TweenSize(UDim2.new(0.6, 0, 0.6, 0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,1)
for i=1, 0,-.05 do
wait(.01)
AboutParent.Parent.AboutFrame.AboutTitleBox.TextTransparency = i
end
AboutParent:TweenPosition(UDim2.new(.04,0,.46,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,.5)
end)
--[[Hover Script]]--
AboutParent.MouseEnter:connect(function(x, y)
AboutParent:TweenSize(UDim2.new(.2,0,.16,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,.5)
end)
AboutParent.MouseLeave:connect(function(x, y)
AboutParent:TweenSize(UDim2.new(.18,0,.14,0),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,.5)
end)
