Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to use TimePosition?

Asked by 8 years ago

Hi all! I'm currently manipulating audio in my latest project. Problem is, I can't seem to get TimePosition to work properly.

Bill.TimePosition = 19
Bill:Play()

This is clearly a small chunk of the code. The script seems to simply skip placing the audio at 19 seconds. I looked around on the forums, but couldn't find anything very useful.

If anyone knows how to make this work, please let me know! Thanks!

1 answer

Log in to vote
1
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
8 years ago

Calling the function Play on the sound will make it start at TimePosition 0. You need to use the function Resume, which will play it from the current TimePosition:

Bill.TimePosition = 19
Bill:Resume()

Keep in mind, TimePosition, TimeLength, and Resume will only work client side. If you want it to play for everyone at that specific time position, then you'll have to set the TimePosition and call Resume for every player in the game.

0
Thank you so much! This was driving me crazy ShiningWindow 127 — 8y
0
No problem :) BlackJPI 2658 — 8y
Ad

Answer this question