Audio still playing even when destroyed

Im working for a game and im making a chargeable move. My only problem is that the charge effect for the move isn’t stopping at all when i stop the sound/destroy it. I check in explorer during testing. When the sound is the destroyed it still continues playing. Is there anything i’m doing wrong? I’m just really convinced this is just a roblox bug.

3 Likes

I think more context around the sound playing conditions are needed

1 Like

make sure you disabled the property called PlayOnRemove

3 Likes

if you place your sound inside gui and you set to true playonrespawn ( something likee that ) . it will appear back . ( its either your script or i assume ur placing sound inside gui )

2 Likes

It’s also possible that you are playing the sound from the original sound instance and not the cloned sound instance (if you are cloning it). And stopping the cloned sound instance’s sound.

It will help us if you can share a part of the script (where you are stoping and destroying the sound instance)

1 Like

sorry for responding so late, but for extra context, this bug doesnt happen when the sound isnt a parent of my character.

maybe stop the sound before destroying
like this

sound:Stop()
sound:Destroy()

may i please know how exactly you are trying to stop the sound?
and how you are playing it from the character

as a precautionary measure, add sound.PlayOnRemove = false before your code

Ive done 2 methods, first I had a sound in the script i was using then I just cloned it to the character played it, when I was done with it I stopped the sound and destroyed it. I also tried setting the volume to zero before destroying it. Which did nothing. My other method was just creating a sound instance and parenting it to the character, and the bug still persists.

Just disable playonremove and make sure to print things.like sounds and stuff in the output

found had to set soundid to a known silent sound id for all sounds when destroying a model broken bandaid fix … so before the :destroy() set all sound instances to the id for something silent (or a desired respawn sound) like many other things this may need logic to ensure your item has the sound back when you need it as opposed to just working like you think it should … good luck