Quenty / NevermoreEngine

ModuleScript loader with reusable and easy unified server-client modules for faster game development on Roblox
https://quenty.github.io/NevermoreEngine/
MIT License
421 stars 124 forks source link

Cannot Stop sounds created on client with SoundUtils #254

Open AverageLuaScripter opened 2 years ago

AverageLuaScripter commented 2 years ago

You cannot stop sounds created on the client with SoundUtils. This is as it uses DataModel:GetService("SoundService"):PlayLocalSound to play sounds locally. If the end user were to destroy the sound while it was still playing, it'd still play and this is especially annoying for use-cases such as doors or tools.

Another pet-peeve is that task.delay continues to run even if the sound is destroyed. Check if the sound is destroyed so you're not calling a nil value!

Quenty commented 2 years ago

See #256 for details on a fix for this!