I have a gui and a script. I'm trying to make my gui stretch when a mouse goes inside of the button that's in the gui. The problem is that for some reason, whenever my mouse leaves the button it doesn't shrink.I don't know what the problem is.
local xScale = script.Parent.Size.X.Scale
local xOffset = script.Parent.Size.X.Offset
local yScale = script.Parent.Size.Y.Scale
local yOffset = script.Parent.Size.Y.Offset
script.Parent.MouseEnter:Connect(function()
script.Parent:TweenSize(UDim2.new(xScale,xOffset+100,yScale,yOffset), Enum.EasingDirection.Out, Enum.EasingStyle.Quint,.5)
end)
script.Parent.MouseLeave:Connect(function()
script.Parent:TweenSize(UDim2.new(xScale,xOffset-100,yScale,yOffset), Enum.EasingDirection.In, Enum.EasingStyle.Quint,.5)
print("shrinked")
end)

2 comments
Do there any errors, do you see output have a 'shrinked' word?
This probably might work. In the TweenSize function, there's another paramater for override right after the time parameter. Try setting it to true. Like: gui:TweenSize(UDim2.new(too lazy 2 add), EasingDir, EasingStyle, 5, >true<)