# Destroy component not working

**URL:** <https://forums.unrealengine.com/t/destroy-component-not-working/522382>\
**Category:** Architectural and Design Visualization\
**Tags:** unreal-engine\
**Created:** [April 9, 2022, 11:17pm UTC](https://forums.unrealengine.com/t/destroy-component-not-working/522382 "2022-04-09T23:17:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_df3f2181](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_df3f2181](https://forums.unrealengine.com/u/anonymous_user_df3f2181)\
**Post date:** [April 9, 2022, 11:17pm UTC](https://forums.unrealengine.com/t/destroy-component-not-working/522382/1 "2022-04-09T23:17:50Z")

</div>

So basically i have a shop where you can buy cosmetics. I setup the attaching it on but when i try to destroy it, it doesnt work. I have tried so many things like detaching the component but every single time it doesnt work. It always comes up with a “Accessed non” error. Does anyone know how to fix this?

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/e/5eedb7217a070ab7e71e8d660a89dcbd95b197ef.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/e/5eedb7217a070ab7e71e8d660a89dcbd95b197ef.mp4)

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [April 10, 2022, 8:11am UTC](https://forums.unrealengine.com/t/destroy-component-not-working/522382/2 "2022-04-10T08:11:01Z")

</div>

You do need to use DestroyActor, because you spawned an actor. But you’re trying to connect that from the ‘target’ node, instead of from the actual spawn node.

Also, you only need to run all this when the player chooses an article, not on tick, which is EVERY FRAME!
