# "Run on Server" Function

**URL:** <https://forums.unrealengine.com/t/run-on-server-function/1330161>\
**Category:** Blueprint\
**Tags:** unreal-engine, functions\
**Created:** [October 12, 2023, 8:37am UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161 "2023-10-12T08:37:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo\_kill7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leo\_kill7](https://forums.unrealengine.com/u/Leo_kill7)\
**Post date:** [October 12, 2023, 8:37am UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161/1 "2023-10-12T08:37:46Z")

</div>

Is there a possibility to run a functions on server. I am not talking about events but about functions

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [October 12, 2023, 9:25am UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161/2 "2023-10-12T09:25:05Z")

</div>

No but you can make a run-on-server event that calls the function 😛

---

<div class="post-metadata">

**Author:** ![Leo\_kill7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leo\_kill7](https://forums.unrealengine.com/u/Leo_kill7)\
**Post date:** [October 12, 2023, 3:21pm UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161/3 "2023-10-12T15:21:39Z")

</div>

I though about that as well. The problem is that I want my function to output something. Do you have any idea how to manage that?

---

<div class="post-metadata">

**Author:** ![Chatouille](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chatouille/32/1194622_2.png) [@Chatouille](https://forums.unrealengine.com/u/Chatouille)\
**Post date:** [October 13, 2023, 7:47am UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161/4 "2023-10-13T07:47:56Z")

</div>

That’s not how it works.

When you call a function to run on a different machine, the instruction is sent to the other machine over the wire. The other machine will only receive it several milliseconds later, meanwhile the calling machine still has to process and render game frames. These calls are _asynchronous_. When you call them from blueprint, they are put in a queue and return immediately (with obviously no return value), so your game code can continue executing.

If you want to “return” something from server, you can make a new run-on-client event, which you call from the server event once you are done there.

---

<div class="post-metadata">

**Author:** ![Leo\_kill7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Leo\_kill7](https://forums.unrealengine.com/u/Leo_kill7)\
**Post date:** [October 13, 2023, 10:25am UTC](https://forums.unrealengine.com/t/run-on-server-function/1330161/5 "2023-10-13T10:25:48Z")

</div>

Thanks for the explanation. Helped a lot
