Hello,
I tried to disable player and NPC collisions and used a script from the devforum and put it into the ServerscriptService.
This is the script:
local PhysicsService = game:GetService("PhysicsService")
local defaultGroup = PhysicsService:GetCollisionGroupName(0);
local playerGroup = "PlayerGroup";
local npcGroup = "NPCGroup";
PhysicsService:CreateCollisionGroup(playerGroup);
PhysicsService:CreateCollisionGroup(npcGroup);
function setNPCGroup(char)
for i,v in pairs(char:GetDescendants()) do
if (v:IsA("BasePart")) then
PhysicsService:SetPartCollisionGroup(v, npcGroup);
end
end
end
function setPlayerGroup(char)
for i,v in pairs(char:GetDescendants()) do
if (v:IsA("BasePart")) then
PhysicsService:SetPartCollisionGroup(v, playerGroup);
end
end
end
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
setPlayerGroup(char);
end)
end)
for _, v in pairs(workspace.NPCfolder:GetChildren()) do setNPCGroup(v) end
PhysicsService:CollisionGroupSetCollidable(playerGroup, npcGroup, false);
PhysicsService:CollisionGroupSetCollidable(playerGroup, playerGroup, false);
PhysicsService:CollisionGroupSetCollidable(npcGroup, npcGroup, false);
PhysicsService:CollisionGroupSetCollidable(playerGroup, defaultGroup, true);
PhysicsService:CollisionGroupSetCollidable(npcGroup, defaultGroup, true);
It works if you don’t have any body parts (most likely a torso) equipped on your avatar (If your avatar is blocky).
But if you have a torso from a bundle equipped, it doesn’t work. You still collide with NPCs or other players.
Here’s some information. I don’t know if this is important. (collision true / false)
blocky player + blocky player = false
blocky player + blocky npc = false
blocky player + not blocky player = true
blocky NPC + not blocky player = true
blocky player + not blocky npc = true
not blocky player + not blocky player = true