Tween timeline with different targets

I’m trying to figure out how to turn off visibility in the first target after it has finished. As a workaround I’m using sprite1.visible = false; in the Update function when the x coordinate has been reached. Seems like there should be a better way to do this.

	var timeline = this.tweens.createTimeline();

    targets: sprite1,
x: 100,
duration: 4000,	
    ease: 'Linear'

//sprite1.visible = false;

    targets: sprite2,
y: 100,
duration: 4000
onStart:()=>sprite2.visible = true,	    
    ease: 'Linear'

Sorry. I forgot I was using a timeline. I can turn off visibility in the first timeline. No need to use that play command.

Hello, I guess you can do…