Picking up item with physics not replicating

I recently followed this tutorial https://youtu.be/wQGnf-YmnhE?si=JOoCMFIZILE6pcCh which sets up blueprints to pickup items using physics and it works great.

I tried adding a rpc which allows me to actually pick up the bat for both the server and the client, but they don’t register when they each pickup and move the bat. If I pickup the bat on the server side and move it, It will still remain in the starting position for the client rather than In the server players hands or to the location it was moved to and vice versa.

Here is an image of my blueprint which does everything I want it to do but just can’t replicate to a client

This is the rpc that allows me to at least pickup the bat for both the server and client but it doesn’t sync like mentioned above. I’m very new to Unreal so I could be doing this totally wrong, but this is how I replicated other things so far.

If anyone knows a way I could have the bat synced up for both the server and clients when they pick it up and throw it that would be extremely appreciated. Thanks!

Here’s a video showing the issue that I’m facing.

Bat needs to be a replicated actor.
Client inputs pick up, starts an animation to pick up, rpc’s server to pickup.
Server “attempts” to pick up actor. If actor exists, is close enough etc server attaches actor to character.

(post deleted by author)

Thanks for the reply. Do you mean the blueprint of the bat, or the variable that’s referencing the bat object. Because the bp of the bat it self is replicated, I just can’t seem to figure out where to plug the rpc into or if I’m even setting them up right.

How does the player interact with the world?

Clients should have a base interaction system such as a Line trace on input. e.g. E to pickup

When the client interacts and the result is true… trace hit something interactable. Then you RPC the server to attempt the same type of interaction. e.g. line trace.

If the servers interaction result is true, IT processes the rest of the logic. e.g. attach bat to hand, update the players state etc.

If the character uses “states” say an enum (unequipped, equipped) and that var is replicated, then you won’t need to multicast anything.

I don’t have a line trace system setup yet. Currently I just have the bat bp that on component begin overlap, I’m able to press E to pickup the item which is the code I sent that was made in the bp thirdperson character event graph. I think what I’m most confused about is just what exactly I need to be replicating in order for the other player to see the bat get picked up and moved around, because it works fine but just doesn’t replicate at all. Sorry if this doesn’t make sense I’m very new to all this.

Overlapping systems have potential faults. IF multiple things are overlapped, you can get multiple executions.

But sticking with your overlap then you hit E and RPC the server to check for overlap and grab what it finds.