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

Running a function when a song ends..?

So I've noticed that wait(song.TimePosition) works in studio, but not in-game. I learned this after several hours of code that, but anyways... Is there any way to run a function when a song ends?

1 answer

There is an event, 'Ended' contained in sound.

ex:

audio.Ended:connect(function()
	-- code
end)

3 comments

0

This event only works in studio, not in game.

0

Very interesting. Looking at this more, the event does not even appear to fire with scripts.

0

Figured it out: the audio.Ended event only works on localscripts.

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