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)