I’ve found that having a modulescript for tweening is pretty useful, after seeing other developers (Acecateer IIRC) having such a thing.
TweenUtility.rbxmx (14.4 KB)
Example of use:
local tweenUtil = require(ModuleScript)
tweenUtil.tween(Sound, "Volume", 1, "In", "Quad", 2, function(status)
print("The tween was:", status.Name) -- can be Completed or Cancelled
end)
local parts = {
[workspace.Part1] = workspace.Part1.CFrame,
[workspace.Part2] = workspace.Part2.CFrame,
[workspace.Abc] = workspace.Abc.CFrame
}
tweenUtil.tweenFunc(function(progress)
for part, partCFrame in next, parts do
part.Size = Vector3.new(progress, progress, progress) * 5
part.CFrame = partCFrame
end
end, Enum.EasingDirection.Out, Enum.EasingStyle.Bounce, 1)
But it’d be great to have a dedicated API for tweening as Sharksie suggests, yeah.