# Reenable animation after setloop to once

**URL:** <https://discourse.threejs.org/t/reenable-animation-after-setloop-to-once/50576>\
**Category:** Questions\
**Tags:** animation\
**Created:** [April 19, 2023, 10:25am UTC](https://discourse.threejs.org/t/reenable-animation-after-setloop-to-once/50576 "2023-04-19T10:25:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![human\_being](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/human_being/32/35528_2.png) [@human\_being](https://discourse.threejs.org/u/human_being)\
**Post date:** [April 19, 2023, 10:25am UTC](https://discourse.threejs.org/t/reenable-animation-after-setloop-to-once/50576/1 "2023-04-19T10:25:55Z")

</div>

Hi guys  
i have a simple animation when click on button to enable playing a clip

mmi.addHandler(‘Torus’,‘click’,function(mesh)  
{

```
if(AnimationTrigger == true) {
	action = mixer.clipAction(clip);
	action.setLoop(THREE.LoopOnce);  
	AnimationTrigger = false;
	action.clampWhenFinished= true;
	action.play();
	console.log( AnimationTrigger );
	
	
}

else{

	AnimationTrigger = true;
	action.paused = false;
	action.timeScale = -1;
	action.play();
	console.log( AnimationTrigger );
	
}

})

```

a simple button clicks to play the animation and a second click to reverse it .  
the animation works fine ( play and reverse ) but the issue i have is i need to use .setLoop(THREE.LoopOnce); to play the animation once, but if i click the button again to play the animation from start again it did not work  
to be hosest i think ClampWhenFinished suposed to work alone logicley but Three.js documentation said we need to use it with LoopOnce

so how to activate play again after LoopOnce ??
