# Setting a by-ref var in a function does not replicate/notify

**URL:** <https://forums.unrealengine.com/t/setting-a-by-ref-var-in-a-function-does-not-replicate-notify/407517>\
**Category:** Editor Scripting\
**Tags:** Variable, reference, broken, notify, unreal-engine, function, question\
**Created:** [October 20, 2017, 3:42pm UTC](https://forums.unrealengine.com/t/setting-a-by-ref-var-in-a-function-does-not-replicate-notify/407517 "2017-10-20T15:42:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![falconblade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@falconblade](https://forums.unrealengine.com/u/falconblade)\
**Post date:** [October 20, 2017, 3:42pm UTC](https://forums.unrealengine.com/t/setting-a-by-ref-var-in-a-function-does-not-replicate-notify/407517/1 "2017-10-20T15:42:23Z")

</div>

I have a variable/property on a pawn blueprint that is replicated and set to auto-notify. If I pass that variable to a function by-reference and update it using set by-ref var inside the function, it does not Replicate/RepNotify the change.

---

<div class="post-metadata">

**Author:** ![nickexists23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nickexists23](https://forums.unrealengine.com/u/nickexists23)\
**Post date:** [February 7, 2024, 3:24am UTC](https://forums.unrealengine.com/t/setting-a-by-ref-var-in-a-function-does-not-replicate-notify/407517/2 "2024-02-07T03:24:33Z")

</div>

I have the same problem. Is there really no way to do this? I am trying to do this in a macro, but it doesn’t call the variables `OnRep` function
