We don’t need to overcomplicate things. Instead, we can play the two tweens into a while true do
loop in a LocalScript
.
Also, in this quote:
You can use EasingStyle.Exponential
inside of the tweenInfoTranslate
variable like so:
--// This code is almost matched to fit your style of coding
local TweenService = game:GetService("TweenService")
local tweenInfoTranslate = TweenInfo.new(translationSpeed, Enum.EasingStyle.Exponential, Enum.EasingDirection.In)
local goalTranslation = {Position = defaultPartPosition + Vector3.new(0, 3, 0)}
local goalTranslation2 = {Position = defaultPartPosition + Vector3.new(0, -3, 0)}
local translatePart = TweenService:Create(part, tweenInfoTranslate, goalTranslation)
local translatePart2 = TweenService:Create(part, tweenInfoTranslate, goalTranslation2)
while true do
translatePart:Play()
translatePart:Wait() -- waits until translatePart finishes
translatePart2:Play()
translatePart2:Wait() -- waits until translatePart2 finishes
end