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

How can I detect if a sound has ended?

Apparently ROBLOX only allows local scripts inside of the player to use the events such as .Ended and .Stopped.

I'm not trying to detect if it's paused or played. Only if it's stopped.

TimeLength and TimePosition only works with local scripts also.

Is there anyway I can use a serverscript to detect this?

5 comments

0

The easiest method would be to connect the .Stopped or .Ended events in a LocalScript, and then use a RemoteEvent object to tell the Server that the sound stopped for that specific client.

0

 Dumb post by Wfvj014 has been deleted.

0

There's a big difference. Just like a movie.. if you pause it then it holds its position. If you stop it then it resets it and stops it.. What kind of question was that?

0

Dumb post by Wfvj014 has been deleted.

0

Yeah, the question was specifically asked to detect if the sound had ended on its own. Not by if it's paused or playing. I'm very experienced with sounds also. I have a script that pauses and plays the sound, I want to DETECT IF IT ENDS! Otherwise both functions will interfier with eachother. Just get off of my post please.

1 answer

✓ Accepted answer

Simply, No.

The only way to do it, as adark correctly suggested, is to have a LocalScript listen for it and then fire a RemoteEvent when it is done. Depending on what you want to do after it is finished, you may either not need these events or not need to use a regular Script.

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