How to pause until an animation has finished playing

yes, in the API reference for gui.animate you can see that there’s a [complete-function] parameter:

gui.animate(node,property,to,easing,duration,[delay],[complete_function],[playback])

you can call a function there that will be executed once the animation finishes, so you can do something like this:

gui.animate(node, property, to, easing, duration, [delay], function()
    msg.post(load new collection)
end)