Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DoubleSlashDesign2/b587ca479595c14418f7 to your computer and use it in GitHub Desktop.
Save DoubleSlashDesign2/b587ca479595c14418f7 to your computer and use it in GitHub Desktop.
local animate = function(obj, ref)
if ref then
obj.transitionLoop = ref
end
-- Optional resets:
obj.x = 0
transition.to(obj, {
x = 10,
-- Do not remove:
onComplete = obj.transitionLoop
})
end
-- Start infinite loop:
animate(Target, animate)
-- To stop infinite loop:
-- Target.transitionLoop = nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment