# Changing Skeletal Mesh component in Server function

**URL:** <https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861>\
**Category:** Multiplayer & Networking\
**Tags:** skeletalmeshcomponen, unreal-engine, Multiplayer, question\
**Created:** [January 24, 2015, 1:51pm UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861 "2015-01-24T13:51:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [January 24, 2015, 1:51pm UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861/1 "2015-01-24T13:51:09Z")

</div>

Inside the character class I made a server function which changes a skeletal mesh component of the character:

```
UpperBody_Gear->SetSkeletalMesh(PickupItem->SkelMesh_Gear_Male);

```

But so far the component only changes on the server. How can I make it so it also changes (replicates) on all the clients aswell?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Moss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/moss/32/704032_2.png) [@Moss](https://forums.unrealengine.com/u/Moss)\
**Post date:** [January 24, 2015, 3:08pm UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861/2 "2015-01-24T15:08:00Z")

</div>

There are several ways to perform what you do. You can set a replication value to be send to the client that represents the mesh, for instance just a simple int value, and depending on the value the client will set the right mesh. Another ways is to configure the mesh in your PickupClass, in it’s defaults for example. Then when you pickup the item you can send the class to the client via functional or variable replication and get the right mesh from there, the idea is that the class holds a ref to the mesh. The final implementation varies depending on your pickup system though.

The idea of all ways is always a way to tell the client what to do, and not only the owning client but all the other clients in the match. Using variable replication will make the broadcast of the mesh easier because the engine can replicate it directly.

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [January 24, 2015, 4:07pm UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861/3 "2015-01-24T16:07:18Z")

</div>

Hey Moss,

thanks for your answer!

For clarification’s sake, “UpperBody\_Gear” is a SkeletalMeshComponent in the Character class. In the Characters constructor this component’s replication is activated (UpperBody\_Gear-\>SetIsReplicated(true)😉

The “PickupItem” is another Actor, which holds a SkeletalMesh reference (SkelMesh\_Gear\_Male). In the PickupItem’s constructor, replication is activated (SetReplicates(true)😉

Now when I change the SkeletalMeshComponent in the Character class, it should replicate its changes to the clients, right? Or am I missing something here?

---

<div class="post-metadata">

**Author:** ![Pseudocorpus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pseudocorpus/32/453689_2.png) [@Pseudocorpus](https://forums.unrealengine.com/u/Pseudocorpus)\
**Post date:** [January 25, 2015, 11:17pm UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861/4 "2015-01-25T23:17:10Z")

</div>

Nevermind… I added a NetMulticast function and executed it inside the server function to update the components on all the clients.

---

<div class="post-metadata">

**Author:** ![Streliteela](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Streliteela](https://forums.unrealengine.com/u/Streliteela)\
**Post date:** [July 3, 2018, 10:54am UTC](https://forums.unrealengine.com/t/changing-skeletal-mesh-component-in-server-function/304861/5 "2018-07-03T10:54:05Z")

</div>

I have the same problem.  
it seems that it only occurs when using skeletal mesh component.
