Part is Destroyed before Sound is Played

I have a tycoon game and when someone steps on a button and buys it, there should be a sound effect when they do that. However, the part is destroyed before the sound can be played. Does anyone have a workaround for this? I can’t use a wait command because I want the part to be gone instantly. The following image is the script.

image
V is defined as all the button parts. (ButtonFolder:GetChildren)

Set the property PlayOnRemove to true on the sound, this will make it play when the sound instance is destroyed, which will be at the same time as the button is removed.

I’m not the best at scripting… Where do I put the PlayOnRemove? I don’t quite understand what you mean.

It’s not something you need to put in the script, if you click the sound instance and look at the property table and search for the property PlayOnRemove and check that box it should do the trick.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.