# Network synchronization

**URL:** <https://forums.unrealengine.com/t/network-synchronization/1320853>\
**Category:** Multiplayer & Networking\
**Tags:** unreal-engine, question\
**Created:** [October 3, 2023, 9:17am UTC](https://forums.unrealengine.com/t/network-synchronization/1320853 "2023-10-03T09:17:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nagibator\_1229](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nagibator\_1229](https://forums.unrealengine.com/u/Nagibator_1229)\
**Post date:** [October 3, 2023, 9:17am UTC](https://forums.unrealengine.com/t/network-synchronization/1320853/1 "2023-10-03T09:17:27Z")

</div>

I have a simple example:

 ![Снимок экрана (255)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/b/7cb4533b233d95954e4f04960978a31d060f98e7.png)  
/  
/  
 ![Снимок экрана (256)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/7/c07c275f404633cd089b9a1b973b6863e1827f00.png)

There is a replicated actor. There is also a replicated variable Collision Enabled using Repnotify. In the repnotify implementation, I simply turn off physics and collision. By default, the actor has physics and collision enabled. On a custom key, I take an instance of the replicated actor class from the stage, set the replicated variable and attach it to the actor. Everything is fine on the server, but on the client the actor is not attached. If I put a delay between setting the replicated variable and attaching, then everything works. Problem: On the client side, the repnotify call occurs later than the attachment. Although I call repnotify first, and then attachment. Why is this happening? And how to solve? Perhaps there is another way of what I want to do?

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 3, 2023, 1:50pm UTC](https://forums.unrealengine.com/t/network-synchronization/1320853/2 "2023-10-03T13:50:32Z")

</div>

> [@Nagibator\_1229](#):
>
> call occurs later than the attachment. Although I call repnotify first, and then attachment. Why is this happening?

That happen because server and client are different machines… one could be in China, and the other could be in USA…

> [@Nagibator\_1229](#):
>
> And how to solve?

You can’t modify network velocity…

> [@Nagibator\_1229](#):
>
> If I put a delay between setting the replicated variable and attaching, then everything works

That does’t work really… you never know how much time take to complete.

Use a timer and check it while… or change your logic.

---

<div class="post-metadata">

**Author:** ![Nagibator\_1229](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nagibator\_1229](https://forums.unrealengine.com/u/Nagibator_1229)\
**Post date:** [October 3, 2023, 2:11pm UTC](https://forums.unrealengine.com/t/network-synchronization/1320853/3 "2023-10-03T14:11:55Z")

</div>

That’s not the point at all. Even if the other computer were on another planet. There must be a sequence in which packets are sent. And I don’t understand how it works in the unreal based on the example.

---

<div class="post-metadata">

**Author:** ![Ivan3z](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ivan3z](https://forums.unrealengine.com/u/Ivan3z)\
**Post date:** [October 3, 2023, 2:16pm UTC](https://forums.unrealengine.com/t/network-synchronization/1320853/4 "2023-10-03T14:16:15Z")

</div>

it works like threads (parallel process) … simply is asynchronous

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [October 4, 2023, 5:17pm UTC](https://forums.unrealengine.com/t/network-synchronization/1320853/5 "2023-10-04T17:17:12Z")

</div>

It’s all bundled into a single packet.

Image 1 logic should only happen on the server.

input (3) → switch has authority (Remote) → RPC server

Server RPC → get actors → set is collision enabled → Attach

Net Actor BP should have “Replicates” ticked true.
