Attach To Component replicated

My player has a gun. On owner side I want it to be attached to the player’s hand.(VR)

But on the other clients, I want the gun to be attached to the avatar of the player.

But since Attach To Component is automatically replicated I cant chose. it will always attach to the last (AttachToComponent) I call. Is there a way to attach the gun to the component I want without repetition.?

Does anyone have an idea how I can solve this?

one way is to make ur own attachment code that works this way. I.e do not use built in attach to component on server, but let server send a multicast (or OnRep) to notify all clients to do their own attachment.