Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you detect and stop a song when its over?

Trying to make a radio (like songs that play in the background, not a physical radio) in roblox but is there an easier way instead of waiting? I found this on the developer api website

Ended ( string soundId )

since my pea sized brain cant under stand how to use this, im hear to ask how to use it.

This is my script so far

song1.Playing = true
wait(207)
song1.Playing = false
wait(2)

1 answer

✓ Accepted answer

You can use the sound event Ended

song1.Playing = true
song1.Ended:Wait() -- Waits for song to end
song1.Playing = false
wait(2)


Please mark the answer as accepted if it works

2 comments

0

alright let me try this

0

This did work but im having other issues now that i probably can fix on my own

This discussion is preserved as it was. New answers, comments, and votes are closed.