How to tun an Blueprint event on server only

Working on a game with multiplayer support, and need a way to make a Trigger Box Blueprint to run an event then the Server player collide with it.

The problem is that when the client player collide whit it, the Trigger run the event to the Server.

Hi, “Event ActorBeginOverlap” will fire when any actor overlap is registered. And it will fire on any client/server where this overlapping is happening. So when the client pawn runs into the trigger, then since the client pawn and the Trigger Box Blueprint both exist and overlap on the server, the server will also execute “Event ActorBeginOverlap” and the “OtherActor” would be the client pawn.

So you could check if the “OtherActor” equals the server pawn and only continue then. Of course then any logic you put beyond this check will only execute if the server runs into the trigger.

What do you mean with the “server pawn”?

the Has Authority gives the Server and
the client Authority, is that a bug?

Is the Blueprint set to replicate and did you spawn it on the server or is it not set to replicate and you spawn it on server and client? And did you try to do a print after Authority?

Because from the code you have in the image, when the client walks into the trigger the server is getting teleported. Cause when the client walks into the trigger the event is executed on the server. And the server should have authority and will execute the Teleport. Since you’re using “Get Player Character” with index 0 (that will return the client on the client and the server on the server) the server will teleport the server character.

What do you mean with the “server
pawn”?

“Get Player Pawn” with index 0 will return the server pawn when executed on the server. So same as “Get Player Character” but will also work if the player is a pawn not a character.

use something like this.you can leave a part free if you want nothing happens on server or client for that part