Make player not collide with ragdolls

I searched for a while and couldn’t find this, so, what would you have to do in LUA to make the player walk through ragdolls?


if ent1:GetClass() == “prop_ragdoll” and ent2:IsPlayer() then
return false
return true

Thanks for the help guys.

Remove the return true or else it will screw up all other shouldcollide hooks if I’m not mistaken.

ent1 could be the player and ent2 could be the ragdoll as well.