I am trying to use this:

wait(theAudio.TimeLength); -- theAudio is a variable that is already defined.

This portion of the script doesn't work. I know it doesn't work b/c when I remove it, the script suddenly works as intended.

Thoughts? How can I use TimeLength in wait()?

7 comments

1

TimeLength I believe is a "read-only" Property.

0

What? What does that mean? I can't set wait to the TimeLength of a song?

1

@PerfectAnxiety | Read-only properties can be stored in a variable. "Read-only" means the property itself cannot be redefined. Thus, wait(theAudio.TimeLength) is totally acceptable in this situation.

1

We may need you to post the whole script to answer this question, though.

0

Oh god, I think it just worked. I just didn't test it online or I must have not tested it deeply, thanks guys!!!!

0

This property only works in side localscripts as I know.. I tried scripts and they keep returning weird results..

0

I used a local script and it worked!