Why repnotify's functions is got called on Server as well ?

Hey devs , i was watching some video on Crouch on youtube , and what he did is this (Screenshots) and evrything worked just fine both on Server and Client , i don’t get why its crouching fine on Server if the actual crouching code is inside of On_Rep functions . Isin’t repnotify functions should get called only on client?


If you make a OnRep function in C++ it is indeed only the clients that get the call by default but in Blueprint the function is also called on the server by default.

If you want the same behavior in C++ as the default behavior in Blueprint you simply call the OnRep function after you Set the variable.
You can’t explicitly call the OnRep function in Blueprint so maybe that is why it gets called by default everywhere.