How to clean instantiated gameobject?

I’ve been following this tutorial [2D Shooting in Unity (Tutorial) - YouTube] and when my character shoots the effect that I instantiated is left on the screen.

How can I clean the clone and the effect after it’s used?

You can add events in the middle of animations. Just add an event at the end of the animation (or 2 frames after) that calls for the object destruction.

You are welcome to look at my tools on GitHub and grab the AnimatorExtender. Place that parallel to the animator and call the Animator Event. Tell the animator event to Destroy this Object and you’re done.