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

How can I detect if a sound has ended?

Asked by
Acheo 230 Moderation Voter
8 years ago

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?

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. adark 5487 — 8y
0
 Dumb post by Wfvj014 has been deleted. User#11440 120 — 8y
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? Acheo 230 — 8y
0
Dumb post by Wfvj014 has been deleted. User#11440 120 — 8y
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. Acheo 230 — 8y

1 answer

Log in to vote
2
Answered by 8 years ago

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.

Ad

Answer this question