# ChildActorComponent reference can't be sent to Server

**URL:** <https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732>\
**Category:** Editor Scripting\
**Tags:** reference, Replication, child-actor-componen, unreal-engine, question\
**Created:** [November 7, 2015, 7:45am UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732 "2015-11-07T07:45:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Genova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Genova](https://forums.unrealengine.com/u/Genova)\
**Post date:** [November 7, 2015, 7:45am UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/1 "2015-11-07T07:45:55Z")

</div>

Hello,

I need to be able to pass a **ChildActorComponent** reference to server (using a Custom Event RunOnServer) when clicking on any actor but when a client click on a **ChildActorComponent** of a different client, it sends a **None** value instead.

Is it a limitation or am I missing something?

My script looks like this :

 ![65908-reference_childactor_script.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/4/88498aa500e494b7bbb0eeee9483069ed6d9fd56.jpeg)

And this is what’s happening :

1. Server is clicking on its own **ChildActorComponent**. Everything is fine. receive Print is showing Ref.

 ![65906-reference_childactor_0.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/b/66b25c826fff03f367c6bb6b11ad7f3da2233967.jpeg)

1. Same when Server is clicking on Client’s **ChildActorComponent**.

 ![65909-reference_childactor_1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/e/a/2ea7ebe20a64781498ff591ba2ed28328e3b4a64.jpeg)

1. Now Client click on Server’s **ChildActorComponent**. It still works !

 ![65910-reference_childactor_2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/5/7/d57d67fc7d75382d5b27cc5ce02ec8dac506047e.jpeg)

1. And bug happens when Client is clicking on server’s **ChildActorComponent**. Receive print is showing nothing.

 ![65911-reference_childactor_3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/4/384177f7843f6df0e4113b5ad4920ef542949246.jpeg)

---

<div class="post-metadata">

**Author:** ![Genova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Genova](https://forums.unrealengine.com/u/Genova)\
**Post date:** [November 7, 2015, 7:47am UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/2 "2015-11-07T07:47:29Z")

</div>

Here is a zipped test project.

Ps : Unrelated, but randomly, client won’t spawn properly…

link text

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [November 9, 2015, 10:32pm UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/3 "2015-11-09T22:32:49Z")

</div>

Hi Genova,

Thanks for report! I was able to reproduce this in test project you provided, and I’ve entered a bug report for issue (UE-23143). It seems Hit Actor returned for a Child Actor Component is its own Actor, rather than returning Actor, and this reference is not being communicated to Server as you would expect a separate Actor reference to do. I will update this post when I see any update on report. Thanks again!

---

<div class="post-metadata">

**Author:** ![Genova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Genova](https://forums.unrealengine.com/u/Genova)\
**Post date:** [November 10, 2015, 1:22am UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/4 "2015-11-10T01:22:37Z")

</div>

Hey ,

Ok, thanks for report.

Any idea of a way to work around that problem ? Without a way to communicate that reference one way or another, I’ll be quite screwed.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_33800a51](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_33800a51](https://forums.unrealengine.com/u/anonymous_user_33800a51)\
**Post date:** [November 10, 2015, 8:49pm UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/5 "2015-11-10T20:49:56Z")

</div>

I would use separate actors, rather than child components, for this. You can then attach them, if necessary.

If you’re committed to using Child Actor Components, you need to make sure Server knows which of it’s own components to reference. So, for example, you can reference each child actor component with an integer, and use that as an ID. Then you can pass server integer and tell it to reference its own child actor component with that integer ID.

---

<div class="post-metadata">

**Author:** ![Genova](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Genova](https://forums.unrealengine.com/u/Genova)\
**Post date:** [November 10, 2015, 10:52pm UTC](https://forums.unrealengine.com/t/childactorcomponent-reference-cant-be-sent-to-server/337732/6 "2015-11-10T22:52:39Z")

</div>

Hey ,

Thanks for tips. It’s what I had in mind as a last resort.  
Kinda dirty but that’ll do.
