With the new collision groups, it's very easy to do this now!
--// Services
local PhysicsService = game:GetService("PhysicsService")
local Players = game:GetService("Players")
--// Code
PhysicsService:CreateCollisionGroup("Players")
PhysicsService:CollisionGroupSetCollidable("Players", "Players", false)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
char.ChildAdded:Connect(function(part)
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part, "Players")
end
end)
for _, part in next, char:GetChildren() do
if part:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(part, "Players")
end
end
end)
end)
Regular Script