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.
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.