Trying to replicate picking items.

So I’m playing around in UE 5.2 I created a way to pick up and hold items by attaching the actors it works with one player. But when I test it for multiplayer, it goes into client one’s hand(The Item) and the other clients are in the anim stat where the hand is out holding the object but no object in hand.

My end goal is to have the item be picked up by one player not all of them. (Till they drop it or something.)

This image shows the 3 client screens. I picked up the item with client 3(Top left) but it ended up with client 1 (Big Screen)

This image is showing the putting item into player hand script.

This may not be enough information let me know if more is needed.

Thank you!

  1. The Item Actor needs to be set to "Replicates true. Details panel under Replication section.
  2. The server needs to spawn and attach the actor.

Client “attempts” to Pickup → RPC server to Pickup
Server picks up → spawns replicated actor → Attaches replicated actor.

The “Attempt” part is the local client doing a trace to hit the pick up actor and execute an animation montage of successful hit.

If you want the sim proxies to execute the animation as well. You need to call a multicast on the server to play the animation. Do a role check (Simulated proxies only). This will skip the owner from replaying the animation.

Thank you very much it worked!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.