# Problem Replicating a Function to the Server

**URL:** <https://forums.unrealengine.com/t/problem-replicating-a-function-to-the-server/342041>\
**Category:** Multiplayer & Networking\
**Tags:** Networking, unreal-engine, UE4, CPP, question\
**Created:** [December 21, 2015, 3:58am UTC](https://forums.unrealengine.com/t/problem-replicating-a-function-to-the-server/342041 "2015-12-21T03:58:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Martinez](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Luis\_Martinez](https://forums.unrealengine.com/u/Luis_Martinez)\
**Post date:** [December 21, 2015, 3:58am UTC](https://forums.unrealengine.com/t/problem-replicating-a-function-to-the-server/342041/1 "2015-12-21T03:58:51Z")

</div>

Hello again AHub community , I am back again with another question. This time, I have a function for capturing a Flag, which already works on the Server and when I pick up the flag with the Client it just kinda pushes it away, although on the Server version the client does have the flag on him. I am having trouble replicating this function into the client so he also sees the flag attached. I am thinking it might have something to do with replicating the variables used for the function parameters or for the conditions to be met. Here what I have so far in code:

H.

UFUNCTION(Server, Reliable, WithValidation)  
void AttachFlagToBlue(class ADisengageCharacter\* OtherActor, FName InSocketName);  
bool AttachFlagToBlue\_Validate(class ADisengageCharacter\* OtherActor, FName InSocketName) { return true; }

Cpp.

void AFlag::AttachFlagToBlue\_Implementation(ADisengageCharacter\* OtherActor, FName SocketName)  
{

}

Not sure if I should replicate the “PickUp” function which calls the Attach function I am replicating aswell.

Thanks in advance ! and I apologize since I’m pretty new with Networking.
