It's hard to explain in the title, but I already know how to make a sound play when a brick is clicked, but I am struggling with the problem that if I click the brick again the sound doesn't play anymore. It's a paper rustle sound that only plays once after the brick is clicked.
This is my script (Lines 09 and 12 are relevant, line 8 is another sound object):
function onClick(click)
for i,v in pairs (script.Parent:GetChildren()) do
if v.ClassName == "ScreenGui" then
c = v:Clone()
c.Parent = click.PlayerGui
end
end
game:GetService("SoundService").Sound:Destroy()
script.Parent.paperRustle:Play()
end
script.Parent.ClickDetector.MouseClick:Connect(onClick)

3 comments
Give your sound a certain name not just Sound for line 8 I suggest.
The sound doesn't play more than once because you've already destroyed the sound inside of the SoundService, so that when the script tries to look for it again it will not find it and will throw an error at you.
Alright, so what you can do is the comment above me. Just inside the script in function onClick(click) put at the bottem of it to "Disable the current script that makes the sound function work".