PC Info: Windows 11, 23H2
Date First Experienced: 2/16/2024
Date Last Experienced: 2/16/2024
Reproduction steps:
1. Open up roblox studio, create a part, parent it to workspace.
2. Run something like the below code at console or in game to create a tween for a part, this code fills Delay argument of TweenInfo.new(), making tween start at Enum.PlaybackState.Delayed.
local tween = game:GetService("TweenService"):Create(workspace.Part, TweenInfo.new(5, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 2), {CFrame = CFrame.new()})
tween:Play()
tween:Pause()
This is a very basic example of this behaviour. Can cause a headache for developers, as I did not even know about it. If the behaviour should be like that, this must be on documentation. You may ask why pause it as soon as it starts to play, it is not that simple, having functions for chain tweening, also skills that stops the time combined can make things get pretty complicated.
We can overcome this with something like observing state change, and pausing the tween after state changes, but finding this bug was hard for me and might be for other developers aswell.
Expected behaviour: This behaviour should be on TweenBase | Documentation - Roblox Creator Hub or Tween should be able to pause at Enum.PlaybackState.Delayed state which means as soon as it leaves the state.
Actual behaviour: Tween can’t be paused at Enum.PlaybackState.Delayed state. Pause method does not warn us about state. Documentation does not hint to this as far as I saw.
Edit: My bad, I meant Enum.PlaybackState.Delayed at behaviour texts, fixed it now.