Weapon sway not working on Android

Hi, i am making a FPS android game and i have a problem with weapon sway.
I got this code, it works fine in the UE4 editor, but after exporting the game as an APK to an Android device, it doesen’t work at all.