How would I transform an object from one location to another on input?

Thanks. That tutorial helped me.