Let’s say I have two objects, the first one is moving and the second one is anchored. If the objects were anchored and I wanted to tween the second one to the first one I could just set the tween goal to {Position = firstObject.Position}. Although in my situation where the first object is moving, the position isn’t constant and the goal references the position at time t of referencing it, therefore moving the second object to the first object’s old position.
Therefore my question is very simple, how can the goal of a tween be updated while it plays?
Because I don’t want the second object to attach to the first one. I want it to smoothly animate before fading away, thus for my case I need to smoothly change multiple properties at once.
You can also manipulate the alpha by a tweening style by using
local alpha = game:GetService("TweenService"):GetValue(dt, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
-- and then pass this value to lerp function in the Heartbeat connection
B.CFrame = B.CFrame:Lerp(A.CFrame, alpha)