Weapon Sway - Client Problem

Hi everyone.
I’ve created a weapon sway system for my game by watching YouTube tutorials. Everything works fine on the server, but on the client side, it’s like what’s shown in the video. Also, there’s a strange problem when watching the client from the server (the weapon spins). Does anyone have any ideas on how I can rework this for multiplayer?

Thanks for your helps, regards.