Why dont replicate this variable from WidgetBP?

Why works this?:

But why this not?:

The second case doesn’t work because widget blueprints are client side only so there is nothing to replicate to. Putting replicated values in a widget blueprint is bad form anyway, so there is always going to be a better way to do it.

Most likely your widget is showing information about other characters, player controllers, or actors, so put the replication in those blueprints and then just use the Widget as a UI device to show information to the client like it is meant to be used.

This dont work too.

121396-2017-01-09+19_00_44-replicated_.jpg

So I can not use “Execute on Server”.
The Server can execute, but client not.
What is the possibility at all?

So what you want to do is move all the code in your first screenshot from the widget blueprint to the player controller. Then connect OnClicked to run that code in the player controller. You can use Get Owning Player to get the player controller that owns the Widget Blueprint and call the function or event in the player controller from there. Replication will work in the player controller but not in the widget blueprint.

Ty, this works perfect.

I try another script, but why dont work this?
This is an Actor. Placed in the World.

This is a Widget.

Server works, Client not.
Why works on PlayerController, but Actor not?