Switching player's view to weapon (Prop Hunt)

So I have a code on my prop hunt server that gives the last prop alive a weapon.
The problem is, when the prop player gets the gun, the view stays with the prop rather than switching to the gun’s view.
I just need to know how to make it switch to the weapon’s view so the player can actually see where they are shooting.
I’ve asked a lot of people about this and have even asked on FP before, but nobody seems to know the answer.
I’d appreciate it if I could get some help with this.