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

Does this work with sounds?

Asked by 8 years ago

I'm making this radio thing that plays random music so i wanted to know if this is the way to know if the music has stopped playing.

wait until sound1.IsPaused = true then


end
---I'm trying new things that i dont know like "until" I though you can use it as that but it didnt work.If you have any tips on this tell me please or just give me an example.

1 answer

Log in to vote
1
Answered by 8 years ago

Well, there is an event that fires when a sound is finished playing. Its the Stopped event of sounds. How do we access this you ask?

sound1.Stopped:connect()

But we do not want to connect to this, we want to wait until it is finished. To do this, we will use the other prefix for events, :wait()

sound1.Stopped:wait()
Ad

Answer this question