Socket two meshs from one blueprint

Hi guys,

I’ve got the following set up:

  • First person shooter game with multiplayer aspects
  • Weapon Blueprint with two skeletal meshes Mesh1P and Mesh3P
  • Character Blueprint with two skeletal meshes Mesh1P and Mesh

When I now pickup a weapon, add it to the character or switch the weapon, the new one should be made visible and attached to the character meshs socket. Mesh1P of the weapon should be attached to the Mesh1P of the character and Mesh3P of the weapon should be attached to the Mesh of the character.

I now have two problems:

  • The AttachTo Node (to attach meshes) in Blueprint does not trigger replication. I solved this by use AttachActorToComponent and so by attaching the complete weapon Blueprint to the Character blueprint. Due to the fact that I only want to attach the meshes this is imho no perfect solution.
  • When I try to attach Mesh1P and Mesh3P with the “AttachTo” blueprint node on client side only one of them works. I suppose this is because the meshes are in the same blueprint.

It would be enough when the owned character shows Mesh3P (for shadows) and Mesh1P for my first person camera and all other characters only need the Mesh3P meshes.

Do you have an idea how to fix my socket problems? Do I really need two blueprints (one for 1P and one for 3P)?
I tried to recreate the things from the ShooterGame example but my project is currently blueprint-focused and I didn’t want to recreate everything again.

Server side function:

Client side function (executed by multicast)

Perhaps I understand something wrong. Perhaps someone could lead me in the correct direction by answering the following questions:

  • Where should be meshes attached to sockets? On server side or on client side?
  • How would you create the following functionality: Multiplayer character switches his weapon. The current weapon should be switched on the server side but the client animation should attach the suiting meshes like needed. Character unequips his pistol and equips the assault rifle. How can this be synced correctly? Should the clients hold the switching meshes separately from the client?