# The opposite of attaching actor to component

**URL:** <https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE4-26, question\
**Created:** [January 18, 2022, 5:18pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338 "2022-01-18T17:18:01Z")\
**Posts on this page:** 7\
**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 18, 2022, 5:18pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/1 "2022-01-18T17:18:01Z")

</div>

I made a function where a sword is attached to my character , but now i want to do the exact opposite , What nodes do i need to use?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/a/0a4f09cf2556d7bd0e340e2876a89f00fd4b2d20.png)

---

<div class="post-metadata">

**Author:** ![jmancoder1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmancoder1](https://forums.unrealengine.com/u/jmancoder1)\
**Post date:** [January 18, 2022, 5:25pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/2 "2022-01-18T17:25:32Z")

</div>

Just use the DetachFromComponent node.

---

<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 18, 2022, 6:03pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/3 "2022-01-18T18:03:39Z")

</div>

When i use that node , i need to also get a reference to the actor which i want to be detached right?

---

<div class="post-metadata">

**Author:** ![jmancoder1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jmancoder1](https://forums.unrealengine.com/u/jmancoder1)\
**Post date:** [January 18, 2022, 6:31pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/4 "2022-01-18T18:31:55Z")

</div>

Yep. You will probably need to save a “Weapon” variable.

---

<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 18, 2022, 6:34pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/5 "2022-01-18T18:34:26Z")

</div>

It’s `Detach From Actor`. It only takes an actor reference. And it will detach an actor from any scene component it’s attached to.

And, as above, you must keep a reference. Querying components for attached actors is a no-no in BPs (afair).

---

<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 18, 2022, 6:59pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/6 "2022-01-18T18:59:55Z")

</div>

OK thx 🙂

---

<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 18, 2022, 7:00pm UTC](https://forums.unrealengine.com/t/the-opposite-of-attaching-actor-to-component/273338/7 "2022-01-18T19:00:06Z")

</div>

Thanks 🙂
