Hi I was scripting this script were you click this model it plays a sound a deletes the model. Can you please help?
function OnClick(theguythatclicked)
local clicks = theguythatclicked:FindFirstChild("leaderstats"):FindFirstChild("Cow Clicks")
if clicks then
clicks.Value = clicks.Value + 1
script.Parent.Sound:Play()
script.Parent:Destroy()
end
end
script.Parent.ClickDetector.MouseClick:connect(OnClick)

2 comments
You're destroying the place the Sound is kept in before it has a chance to start playing. You start the sound on line 6, but you basically delete it on line 7 with the destruction of the script's parent.
Okay thanks!