Sound Not Playing

I have encountered an issue when creating a script designed to play a sound and destroy a tool after 3 seconds of the tool being equipped. The tool is destroyed, but the sound doesn’t play.

My code:

script.Parent.Equipped:Connect(function()
	wait(3)
	script.Parent:Destroy()
	script.Parent.Pop:Play()
end)

The setup in explorer:
Screenshot (185)

The errors in the output:

1 Like

Put property soundplayonremove true, this will fix. (In the sound properties, enable “PlayOnRemove.”

1 Like

the code seems fine but you should destroy the Handle, then play the Pop sound, then wait for the sound to finish playing and then finally destroy the tool
because like this you’re destroying the tool before the script can finish

Worked, thank you for the help!

1 Like

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