# Script to set Set play rate, so that the montage plays a total of exactly 1 second?

**URL:** <https://forums.unrealengine.com/t/script-to-set-set-play-rate-so-that-the-montage-plays-a-total-of-exactly-1-second/472150>\
**Category:** Blueprint\
**Tags:** math, unreal-engine, question\
**Created:** [September 29, 2020, 7:17pm UTC](https://forums.unrealengine.com/t/script-to-set-set-play-rate-so-that-the-montage-plays-a-total-of-exactly-1-second/472150 "2020-09-29T19:17:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thelazylion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thelazylion](https://forums.unrealengine.com/u/thelazylion)\
**Post date:** [September 29, 2020, 7:17pm UTC](https://forums.unrealengine.com/t/script-to-set-set-play-rate-so-that-the-montage-plays-a-total-of-exactly-1-second/472150/1 "2020-09-29T19:17:18Z")

</div>

My math isn’t great, I’m not sure if I’m having a brain fart right now or why I can’t figure this out.

What I’m trying to do is take the length of a montage, it can randomly be 4 seconds long, or 5 or even 10 for example…

I want to set the play rate of the montage that plays the animation in the span of exactly 1 second.

So if it was 4 seconds long, the play-rate should have to be 8?. So i just multiply \*2 of the length? Can anyone confirm if this is correct way to go about this?

Thanks in advanced
