|
I've looked up tons of scirpts for this but none of them really helped or made sence. Just simply trying to make a sound play when you hit an item the i tried:
It works, but the problem is when i try to put Destroy(gameObject) anywhere in the script it either doesn't destroy but plays sound, or vice versa. What should i do. Thanks :D
(comments are locked)
|
|
You can use AudioSource.PlayClipAtPoint() This will play the sound without it being attached to a specific AudioSource component on a GameObject, so it won't stop playing when the GameObject is destroyed.
(comments are locked)
|
