So due to update in CollisionGroups (Updates to Collision Groups), old methods of disabling player-player collision don’t work.
I tried using this script:
local PS = game:GetService("PhysicsService")
local Players = game:GetService("Players")
PS:RegisterCollisionGroup("Player")
PS:CollisionGroupSetCollidable("Player", "Player", false)
local function assignPlayerCollisionGroup(char:Model?)
char:WaitForChild("HumanoidRootPart")
char:WaitForChild("Head")
char:WaitForChild("Humanoid")
for i, v:Instance in pairs(char:GetDescendants()) do
if v:IsA("BasePart") then
v.CollisionGroup = "Player"
end
end
end
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
assignPlayerCollisionGroup(char)
end)
end)
for i, plr:Player in ipairs(Players:GetChildren()) do
repeat wait() until plr.Character
assignPlayerCollisionGroup(plr.Character)
end
But it doesn’t work (console is clear, player’s collisions are not disabled).
The problem may be because some character assets are not fully loaded yet, so I would recommend using the CharacterAppearanceLoaded event instead of CharacterAdded
local PS = game:GetService("PhysicsService")
local Players = game:GetService("Players")
PS:RegisterCollisionGroup("Player")
PS:CollisionGroupSetCollidable("Player", "Player", false)
local function assignPlayerCollisionGroup(char:Model?)
char:WaitForChild("HumanoidRootPart")
char:WaitForChild("Head")
char:WaitForChild("Humanoid")
for i, v:Instance in pairs(char:GetDescendants()) do
if v:IsA("BasePart") then
v.CollisionGroup = "Player"
end
end
end
Players.PlayerAdded:Connect(function(plr)
plr.CharacterAppearanceLoaded:Connect(function(char)
assignPlayerCollisionGroup(char)
end)
end)