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

Sound.Ended event is not being fired?

So i've been making a soundtrack, but the problem is when i try to use the Ended option so i know when to play a new song doesn't fire

workspace.Music:Play()

workspace.Music.Ended:connect(function()
	workspace.Music:Play()
end

When i enter, it plays the music, but as soon as it ends, it doesn't play it again

2 answers

✓ Accepted answer

.Ended only works with LocalScripts. Wait for the sound to end or use a LocalScript on the client.

2 comments

0

Oh, thanks. I will try it, if it worsk i'll accept you

0

:3

Assuming you want the same sound looping, a simpler way to loop is using while true do. For example...

local music = (location of music)

while true do
music:Play()
wait(musiclength)
music:Stop()
end

This will loop.

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