Cubic tween not working

The cubic tween style is not working properly. When I function the tween, it lags.

SCRIPT:

size = UDim2.new(0.691, 0,0.084, 0 * 0.25)
image = script.Parent
local ts = game:GetService('TweenService')
local teamButton = script.Parent
image.MouseEnter:Connect(function()
	image.ImageColor3 = Color3.fromRGB(30, 30, 30)
	local hover = script.Parent.Hover
	hover:Play()
	image:TweenSize(
		UDim2.new(0.75, 0,0.123, 0),
		Enum.EasingDirection.InOut,
		Enum.EasingStyle.Cubic,
		0.3
	)
	script.Parent.ImageColor3 = Color3.fromRGB(30, 30, 30)

end);

Anyone know why?

Why are you using Udims for a decal?

Where does it say it’s a decal?

Hi!

You forgot to add a debounce, so the tween will only run once, for every time their Mouse enters the image. (And won’t be able to run again, until the tween finished)

Sorry my bad is it an image label?

Hi!

You can tell that it’s a UI object, since OP tries to change ImageColor3 on script.Parent (which is equal to our image in this case)

TweenSize and TweenPosition cant tween with EasingStyle set to Cubic, Its a studio bug probably.

Just use TweenService

local Goal = {
   Size = UDim2.new(0.75, 0,0.123, 0)
}
local Tween = ts:Create(image,TweenInfo.new(0.3,Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut),Goal)
Tween:Play()
1 Like