Tween MouseLeave not playing unless MouseEnter tween is finished

Please also see video below

The tween MouseLeave doesnt activate until you wait the full 0.5 seconds on the MouseEnter

local shop = script.Parent.Shop

shop.MouseEnter:Connect(function()
	shop:TweenSize(

		UDim2.new(.09,0,.09,0),
		"Out",
		Enum.EasingStyle.Bounce,
		.5,
		false,
		nil
	)
end)

shop.MouseLeave:Connect(function()
	shop:TweenSize(

		UDim2.new(.08,0,.08,0),
		Enum.EasingDirection.In,
		Enum.EasingStyle.Quad,
		.1,
		false,
		nil
	)
end)
local Button: TextButton = script.Parent.Shop
local TweenService = game:GetService("TweenService")
local Info = TweenInfo.new(.25,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut)
Button.MouseEnter:Connect(function()
	TweenService:Create(Button,Info,{Size = UDim2.new(.09,0,.09,0)}):Play()
end)

Button.MouseLeave:Connect(function()
	TweenService:Create(Button,Info,{Size = UDim2.new(.08,0,.08,0)}):Play()
end)
	

TweenSize and TweenPosition are buggy and im pretty sure deprecated

try this rq

Yes it works! But why though ?

What do you mean why is it deprecated?

Original Post On it: Are GUIObject:TweenPosition(), GUIObject:TweenSize(), and GUIObject:TweenSizeAndPosition() deprecated?

2 Likes

You could have fixed your issue by switching the override parameters on both tweens from false to true.

2 Likes