How to add mesh to socket with BP?

So, i have a simple character and made a weapon socket on his right hand. Now i added a weapon mesh to it. But how would i make the mesh to have an blueprint? Like e.g. i have a sword and the sword has some scripting in it in the Blueprint. How would i make this? How would i add a bp to the mesh?

Right click the mesh in the editor and select “create blueprint using” then add whatever scripting you want to it and then from your characterBP you can use an attach to node and select the socket name to attach it to.
Like this:

Well if you added the swordBP as a child component you could just attach it to the character mesh in the characterBP and then set the socket from the details panel and for go the attach to node all together:


Hey one question, how would i get the weapon?

Okay, but what would i do if i had like 10 weapons in a game? Would i have to import all weapon components inside to the character bp?

No, if that is the case you should setup a “Master weapon class” that you can edit the variables and meshes of and then also create either an inventory setup or a cycling method for them. Then each time you switch to another weapon attach that weapon to the socket point and detach the previous, etc.

These should get you started on BPs for what you are trying to setup:
Inventory setup:

Weapon setup in a characterBP:


You’re welcome, don’t forget to mark this as resolved/answered

Amazing! Thank you so much. It worked. Thanks for taking your time and helping someone out. I appreciate it.