local function callback1(didCompleted)
if didCompleted then
Ready:TweenSize(UDim2.new(0.7, 0, 0.5, 0), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 0.25, true)
else
print("The tween was cancelled, i think you made a misstake")
end
Ready:TweenSize(
UDim2.fromScale(0.75, 0.55),
Enum.EasingDirection.Out,
Enum.EasingStyle.Linear,
0.25,
true,
callback1
)
No, but a good script also should be keeping things as simple and readable as possible. My original code is more readable. No point being redundant and making things harder than it needs to be
You can use TweenService for this. The TweenInfo has a “reverses” parameter, which will play the tween forward and reverse in the same easing types. Make sure to also set the “repeatCount” parameter to -1 (infinite repetition until cancelled or paused). It is not recommended to set it to very large numbers, as cited on the Developer Wiki:
Developers should avoid using large numbers (or math.huge) as a substitute as this is unstable and may stop working at any point.
local TweenService = game:GetService("TweenService")
local ReadyText = Your.Path.To.Text
local GSTweenInfo = TweenInfo.new(0.25, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1, true)
--// if you want it to be stopped/played throughout a function, make it a local and call the :play() function on the next line
local GrowShrinkTween = TweenService:Create(ReadyText, GSTweenInfo, {Size = UDim2.new(0.75, 0, 0.55, 0)})
GrowShrinkTween:Play()
@NinjoOnline, i’m not saying it to be angry, but i think you should move the topic into the #help-and-feedback:code-review because here you already have your script and don’t ask for a feedback.