# How to fix actor detaching from scenecomponent only once

**URL:** <https://forums.unrealengine.com/t/how-to-fix-actor-detaching-from-scenecomponent-only-once/273487>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-26, question\
**Created:** [January 19, 2022, 10:46am UTC](https://forums.unrealengine.com/t/how-to-fix-actor-detaching-from-scenecomponent-only-once/273487 "2022-01-19T10:46:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Togonaaa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/togonaaa/32/88712_2.png) [@Togonaaa](https://forums.unrealengine.com/u/Togonaaa)\
**Post date:** [January 19, 2022, 10:46am UTC](https://forums.unrealengine.com/t/how-to-fix-actor-detaching-from-scenecomponent-only-once/273487/1 "2022-01-19T10:46:29Z")

</div>

I made an input event , When you activate the event. if a character doesnt have a sword , a sword is attached to his hand socket. If he already has a sword , then the sword is detached , but the problem is that the sword is detached only once.

In the video i am pressing G (my input event) continously. but when the sword detaches and the attaches again, it doesnt detach at all.

[https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/e/cec67ce5af7c5c071d38d45627b1ca0cecfc254c.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/e/cec67ce5af7c5c071d38d45627b1ca0cecfc254c.mp4)

![image_2022-01-19_144550](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/4/e4f9aadb7d57c17307b53b102178ae2e311c2d5d.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [January 19, 2022, 11:01am UTC](https://forums.unrealengine.com/t/how-to-fix-actor-detaching-from-scenecomponent-only-once/273487/2 "2022-01-19T11:01:51Z")

</div>

I see you did not take [our recommendation](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/4) regarding storing references to heart at all 😜

It would be something closer to this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/4/0476268bab68a55bd9cfcd632e9b737563e452a2.png)

Avoid using `Get (All) of Class` nodes if you can. They have a very _specific_ use case scenarios, this is not one of them.

---

<div class="post-metadata">

**Author:** ![Togonaaa](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/togonaaa/32/88712_2.png) [@Togonaaa](https://forums.unrealengine.com/u/Togonaaa)\
**Post date:** [January 19, 2022, 11:33am UTC](https://forums.unrealengine.com/t/how-to-fix-actor-detaching-from-scenecomponent-only-once/273487/3 "2022-01-19T11:33:42Z")

</div>

alright thanks :DDD
