Let's say we have a frame that has a ChildAdded event handler like this.
local History = {}
Frame.ChildAdded:connect(function (Frame)
for i,v in next, History do
v.Position = v.Position + UDim2.new(0,100,0,100)
end
Frame:TweenPosition(Frame.Position + UDim2.new(0,100,0,100), nil, nil, 1, true)
table.insert(History,1,Frame)
end)
Now, the problem is that if another frame is added before the first tween is finished, the frame will end up at the EndPos provided to TweenPostion and not the new position set by looping through the history table. While I could obviously just call TweenPosition again, it still does not cancel that first tween position. Is there any way to get the TweenPosition override working besides waiting until the first tween is finished? |