Make an object move in one direction, then go back to it's original position

Last updated: March 17, 2025

  1. Open the "code builder" on your selected part (Shape)

  2. Find "At Start" in "Events" = (Yellow Button)

  1. Find "Do forever" in "Control" = (Orange Button)

  1. Find "Tween position in plot" in "Motion" = (Blue button)
change from "To" to "By" in drop down options and select the number of points you need it to move by (See picture)

  1. Find "Wait" in "Control" = (Orange Button)
connect "Tween position" to "Wait". All of them should be inside a "do forever block" (See picture)

  1. Copy "Tween position" and "Wait" Code block
Change points to a (-) on the copied "Tween position" Block (See picture)
Combine all inside a "Do forever block"

  1. Save the code and enjoy!

Was this article helpful?

Thanks for your feedback!