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

New Sound Property?

Asked by
Mauvn 100
9 years ago

Hi, I heard there is a new Sound Property called "Time.Lenght" and I never knew how to use it even though it's on the wiki but it shows no example.

Is it still in Development or just not written anywhere?

Thanks.

1 answer

Log in to vote
2
Answered by 9 years ago

I'm thinking you would use it like any other property.

    print(Sound.TimeLength)

According to the wiki, it returns the time in milliseconds, so if you wanted to find the length of a sound in seconds, you would do:

    print(Sound.TimeLength / 1000) -- 1000 ms = 1 second
0
Alright, thanks. Mauvn 100 — 9y
Ad

Answer this question