Does calling Set Owner on the client have any effect?

I would expect ownership to only be assignable on the server, and in most cases this seems to be true, but I’ve run into a strange situation where calling Set Owner on the client is having an effect. I’m missing something

This code runs on the server. If I remove the box circled in red, my code doesn’t work anymore. I’m not sure why this works, as I wouldn’t think you could assign an actor to be an owner from the client

Clients can SetOwner but the Server will discard the RPC if it isn’t set to the same owner. The reason why this works is most likely because you are using a listen-server and the host is allowed to set the Owner.

I’m using Play as Client in the editor, so it’s not the case that it’s a listen-server.

It will change the owner locally only, and you will be permanently out of sync (or at least, until the server changes it and sends an update to the client).

There’s no reason to call SetOwner() client-side on a replicated actor. It needs to be called Server side.

Realistically SetOwner() should have an authority check internally, but it doesn’t for some reason.

If I remove the client-side call to SetOwner, it stops working, though, so it is having an effect

Maybe your code is running on both sides?