wait()
function onTouched(hit)
wait() script.Parent.Anchored = false script.Parent.Sparkles:Destroy() script:Destroy()
end
script.Parent.Touched:connect(onTouched)
Nothing appears in the output. It is unanchored upon touch, but still has sparkles.
wait() function onTouched(hit) wait() script.Parent.Anchored = false script.Parent.Sparkles:remove() script:Destroy() end script.Parent.Touched:connect(onTouched)
Everything with this looks alright. I prefer to use the ':remove()' command, but this still should be fine. Try it like this and make sure that you're leading the 5th line to the sparkles correctly.