# Attach actor to component not working

**URL:** <https://forums.unrealengine.com/t/attach-actor-to-component-not-working/482238>\
**Category:** Community & Industry Discussion\
**Tags:** object-picker, attach-to-actor, unreal-engine, component, Components, mouse-click, question\
**Created:** [April 20, 2021, 10:32pm UTC](https://forums.unrealengine.com/t/attach-actor-to-component-not-working/482238 "2021-04-20T22:32:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin114987](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kevin114987](https://forums.unrealengine.com/u/kevin114987)\
**Post date:** [April 20, 2021, 10:32pm UTC](https://forums.unrealengine.com/t/attach-actor-to-component-not-working/482238/1 "2021-04-20T22:32:04Z")

</div>

Hello I have a question that I think has a pretty simple solution but I can’t seem to work it out.

I am trying to simply pick up this object.  
The conditions for this are:

- Clicking the left mouse button
- Must be overlapping with the sphere collision box of the object.

When these are true, the object should be attached to a socket.  
This works when I only use the overlapping sphere but in combination with the mouse click it won’t work.  
What is surprising is that when I only use the mouse klick as the action to pick up the object, it doesn’t work eather so I think the problem is somewhere there but can’t figure it out.

Here are my blueprints.

![336524-attach-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/6/e26123b94e9e6ed6feda418877e705d3f937510c.png)

 ![336525-attach-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/0/b/60ba5f9007937f1b64dfbcfa6c6c3525b18554a4.png)

---

<div class="post-metadata">

**Author:** ![ugmoe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ugmoe](https://forums.unrealengine.com/u/ugmoe)\
**Post date:** [April 21, 2021, 12:08am UTC](https://forums.unrealengine.com/t/attach-actor-to-component-not-working/482238/2 "2021-04-21T00:08:32Z")

</div>

Try doing it without the socket name

If that doesnt work, put a print string node between the left mouse button and the branch, to see if your left click is actually executing.  
There is a chance that your left click is being consumed somewhere else, like maybe the player controller

---

<div class="post-metadata">

**Author:** ![kevin114987](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@kevin114987](https://forums.unrealengine.com/u/kevin114987)\
**Post date:** [April 21, 2021, 8:53am UTC](https://forums.unrealengine.com/t/attach-actor-to-component-not-working/482238/3 "2021-04-21T08:53:47Z")

</div>

Thank you so much!

Yes the mouse button was not firing when I attached the string.

I just needed to get the character input like this:

![336545-solved.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/2/5322ad757cbb64092c3a274c34c3de5318a206b9.png)

Works perfectly now thank you!
