[DarkRP] Disabling Player to Player Collisions with Script. (odd side effects) - [Need Help]

So I have the following code implemented into my server. lua/autorun/server/example.lua

if a:IsPlayer() and b:IsPlayer() then
return false

hook.Add(“PlayerInitialSpawn”,“NoCollide Players”, function(ply)

Basically what I’m trying to accomplish here is to disable player to player collisions. Simple enough right?
The script above works as intended, but with a few side effects.

  • m9k bullets do no damage, and completely pass through players. ( no errors in console )
  • impossible to target players with physgun. ( Cannot pick up people, no errors in console )

If anyone knows a fix for this, I hope you’ll share your knolage! Thank you for your time & consideration. Have a wonderful day! :smiley:

if a:IsPlayer() and b:IsPlayer() then -- If both ents are players, return false
return false 
elseif a:IsPlayer() or b:IsPlayer() then -- Will make other stuff, like bullets collide with players
return true -- (We don't just write "return true" here due to things like the no collide tool. As it would the collision between no collided props)

Tested and still cannot kill or target players.