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

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

Asked by 3 years ago
Edited 3 years ago

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

Log in to vote
0
Answered by
Leamir 3138 Moderation Voter Community Moderator
3 years ago
Edited 3 years ago

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

0
alright let me try this gpp_CSRO 4 — 3y
0
This did work but im having other issues now that i probably can fix on my own gpp_CSRO 4 — 3y
Ad

Answer this question