✓ Accepted answer
You actually can't set characters' body parts to be CanCollide false except for limbs. You need to use collision groups.
The first thing you'll want to do is set up a collision group like this. Make sure the box for "Player" is unchecked.
Now, the thing about this is that if you do this from a LocalScript, it will not work because your player will be non-CanCollide only on their own client, but to everyone else's they'll be the default collision group. This is why you'll want to use a PlayerAdded event from a server-side script in ServerScriptService.
local PhysicsService = game:GetService("PhysicsService")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
for i,v in pairs(character:GetDescendants()) do
if v:IsA("BasePart") then
PhysicsService:SetPartCollisionGroup(v, "Player")
end
end
end)
end)
If you playtest, you'll notice that players will completely walk through each other. I hope this helps! Reply if you have any questions.
1 comment
Well, my laptop is really laggy when i do player testing. It just opens loads of studios.