Broken Button position/size tweens

Using tweenposition and tweensize on the button resets all of its position and size values to 0 while tweening and then sets them to the goal value and the end, what happening? Look in the properties tab at the button’s position/size.

-- opening tween
	TweenService:Create(InventoryFrame, invFrameTweenInfo, {
		AnchorPoint = Vector2.new(InventoryFrame.AnchorPoint.X, 1)
	}):Play()  -- inventory tween
        OpenBtn:TweenSize(UDim2.new(1, 0, 0, 32), nil, Enum.EasingStyle.Cubic, 0.3, true)
        OpenBtn:TweenPosition(UDim2.new(0.5, 0, 0, 0), nil, Enum.EasingStyle.Cubic, 0.25, true)
-- closing tween
	TweenService:Create(InventoryFrame, invFrameTweenInfo, {
		AnchorPoint = Vector2.new(InventoryFrame.AnchorPoint.X, 0)
	}):Play()  -- inventory tween
        OpenBtn:TweenSize(UDim2.new(0, 128, 0, 32), nil, Enum.EasingStyle.Cubic, 0.3, true)
        OpenBtn:TweenPosition(UDim2.new(0.5, 0, 0, -8), nil, Enum.EasingStyle.Cubic, 0.25, true)

These are the only tweens affecting these UIs.

1 Like

I think the issue here is that you’re setting the EasingDirection to nil (non existent), so it doesn’t show the 2d tweening path, but just skips to the end position.

1 Like

Managed to fix it by just using TweenService:Create()

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.