GuiObject:TweenSize and TweenPosition don't work properly

Issue Type: Other
Impact: Low
Frequency: Constantly
Date First Experienced: 2021-04-03 00:04:00 (-05:00)
Date Last Experienced: 2021-04-14 22:04:00 (-05:00)

Reproduction Steps:

  1. Create a ScreenGui in StarterGui

  2. Create a Frame in the ScreenGui

  3. Create a LocalScript inside the Frame

  4. Add the code:

    wait(1)
    script.Parent:TweenPosition(UDim2.new(0, 300, 0, 400), Enum.EasingDirection.InOut, Enum.EasingStyle.Cubic)

  5. Play the game with character

  6. Also try using TweenSize, and Cubic, Circular, and Exponential interpolation (they don’t work)

Expected Behavior:
The Frame should smoothly interpolate to the position (300, 400).

Actual Behavior:
The frame jumps to the position (0, 0) before jumping to the final position. There is no smooth motion.

Workaround:
Use the TweenService instead, or avoid using Cubic, Circular, or Exponential interpolation.

4 Likes

I can confirm this is happening. As observed here, the Frame which was tweened using the Cubic EasingStyle jumped to (0, 0) and did not tween properly to its final position. It seems to only affect the Cubic, Circular, and Exponential EasingStyles.

Here’s a repro for the issue:
GuiTweeningBugRepro.rbxl (23.7 KB)

The use of these functions are not deprecated, even though they should be, but they’re highly discouraged.

Like you said:

:TweenPosition() and :TweenSize() are ways to get things done quickly. You should, when actually making any project, use TweenService instead.

There’s also BoatTween which I was impressed by recently.

Anyways that was just a message to any people creating new code or updating code or changing anything.

This should be fixed as code made Pre-TweenService existing are gonna be affected hugely by this.
I hope these functions get deprecated though.

The mentioned easing styles which don’t work were added after TweenService, so the impact of this is very minimal. Maybe if the code iterated through all easing styles and used them, it could be problematic, although this doesn’t seem like something that would ever be done. I also don’t believe this is a new bug, this has likely existed since the easing styles were added (in version 395).

3 Likes

Hello. Unfortunately, fixing Size and Position is not on the roadmap as they are being deprecated. As mentioned, it is strongly recommended that TweenService be used instead.

3 Likes

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