# Howto have server set actor owner to player controller?

**URL:** <https://forums.unrealengine.com/t/howto-have-server-set-actor-owner-to-player-controller/358395>\
**Category:** Blueprint\
**Tags:** spawn, actor, owner, rpc, unreal-engine, CPP, question\
**Created:** [May 24, 2016, 9:47am UTC](https://forums.unrealengine.com/t/howto-have-server-set-actor-owner-to-player-controller/358395 "2016-05-24T09:47:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BugSwat](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BugSwat](https://forums.unrealengine.com/u/BugSwat)\
**Post date:** [May 24, 2016, 9:47am UTC](https://forums.unrealengine.com/t/howto-have-server-set-actor-owner-to-player-controller/358395/1 "2016-05-24T09:47:59Z")

</div>

I had this question [How to know if listenserver/client, owner for rpc?](https://answers.unrealengine.com/questions/416305/how-to-know-if-listenserverclient-owner-for-rpc.html) where I got a very nice answer.  
Now I want to use more of that answer and to be able to do that I have the following question:

How do I have the server set the owner of an actor to the player controller I want?  
In my case it should be very easy, I just don’t get it.

I want:

- a spawner class which is (like the playercontroller) able to rpc
- the spawner class blueprint will just be put into the level from the editor, or is that already the wrong first step?
- the spawned actors shall be owned by the client (I’ll have the same name for them on all clients, so I can rpc (validate) actions across server/clients, works already)

My problem is the spawner class. How do I set it to be able to rpc?  
I tried  
`pSpawnerClass->SetOwner(pPlayerController->GetOwner() )`  
but either it crashes everything or does nothing at all.  
I even put it into the first tick event because as read somewhere that ownership is not correctly set in BeginPlay but in Tick.

I am currently working around this and “misusing” the PlayerController for a lot of things.  
I’d like to have an answer I can use the next time I have to do something like this.

Btw, thanks for reading through the wall of text until here 😉

---

<div class="post-metadata">

**Author:** ![Yun-Kun](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Yun-Kun](https://forums.unrealengine.com/u/Yun-Kun)\
**Post date:** [July 30, 2016, 7:07pm UTC](https://forums.unrealengine.com/t/howto-have-server-set-actor-owner-to-player-controller/358395/2 "2016-07-30T19:07:38Z")

</div>

I have the same issue in Blueprint. I can’t tell an actor what is his owning connection. I tried with Set Owner and the input parameter “Owner” when spawning it but it didn’t work. The actor is always owned by the Server, no matter what I do.
