TweenSize() is instant

local hovercolor = Color3.fromRGB(75, 75, 75)

for i,v in pairs(script.Parent:GetChildren())do
	if v:IsA("TextButton")then
		local origsize = v.Size
		local frame = Instance.new("Frame")
		frame.BackgroundColor3 = hovercolor
		frame.Size = UDim2.new(0,v.Size.X.Offset,0,0)
		frame.Position = UDim2.new(0,v.Position.X.Offset,1,0)
		frame.AnchorPoint = Vector2.new(0,1)
		frame.BorderSizePixel = 0
		frame.Name = v.Name.."HoverOver"
		frame.ZIndex = 2
		frame.Parent = v.Parent
		
		v.MouseEnter:Connect(function()
			frame:TweenSize(UDim2.new(0,origsize.X.Offset,0,origsize.Y.Offset),Enum.EasingDirection.In,Enum.EasingStyle.Exponential,1,true)
		end)
	end
end

I haven’t scripting the mouseleave yet; its not the problem. The problem is when the mouse enters, after the tweendelay, it instantly shows up.

For some reason, I’ve encountered similar issues whenever I use Enum.EasingStyle.Exponential or Enum.EasingStyle.Quad. See if using a different style fixes it, and if it does, then that means the issue has to do with the easing style itself, not something you did wrong in your code.

I had it on cubic to begin with; something wrong with the easing style was the first thing that came to mind. Too bad that doesn’t fix it.

Thanks for the reply

1 Like

Cubic may have been one which caused problems-- don’t remember. Try sine.

1 Like

Ooo… sine works! Apparently cubic, exponential, and circular had these issues for me.

2 Likes

If I remember correctly, cubic, exponential, and circular don’t work with TweenSize, TweenPosition, or TweenSizeAndPosition, but they work fine with TweenService.

3 Likes