Download

How to get a variable from local controller when in multiplayer game.

Hi, all.
I want to get a variable from the local controller to refresh other controller’s variable.
But if I create a custom event with “Run On Server”, and give it a parameter of local controller, I can’t get the variable from the parameter.
I only can get this parameter from server controller.
Can anyone help me?

$36%L8F}8A5HUN8{}GQ{X{2.png

2LJ4E72)2$D3%961N~~U6X1.png

![(S$KMB@ZO2{G8(AGL5Y[FP.png|364x238

A HUD/umg element cannot call to the server. This is client side only.

You would want to use the umg to call an event on the player controller that will then call to the server.

Ie button is pressed cast to player controller run event choose team

Then on the player controller this does the logic and calls the server function

I made an example project for someone here:

I changed my project, now I can select team and attach the specified player controller to the specified character, but if I want to get the variables from the character in the umg on client, it always can’t get the player character.

![{NW6[J7FH$HP3MD)U0RJ2K.png|424x623

![3D4N)1T%V65PVSG%KB]EEX5.png|1004x119](upload://A6xBHRN5JubGpEI5YcGKjbn2hTD.png)

![R7]M{X}A%FPDAP]3@M}FVMY.png|1213x234](upload://6Zp1OHEeWKDyJ1RDTwyFTyWWpvi.png)

8G}KOLJF~WM}A(D1S@Q4K6H.png