Bullet ray-cast/scoping mechanism how to?

https://playcanvas.com/editor/scene/1360663

i made the handgun a child of the camera but i would like to know what i am supposed to do to make a working weapon system for multiplayer. and how to add hands for the player to hold the gun,
https://playcanvas.com/project/891298/overview/3d-game