local PhysicsService = game:GetService("PhysicsService");
local NpcFolder = workspace.NPC;
PhysicsService:RegisterCollisionGroup("NPC");
PhysicsService:CollisionGroupSetCollidable("NPC", "NPC", false);
for _, NPC in NpcFolder:GetChildren() do
if NPC:IsA("Model") then
for _, Child in NPC:GetChildren() do
if Child:IsA("BasePart") then
Child.CollisionGroup = "NPC";
end;
end;
end;
end;local PhysicsService = game:GetService("PhysicsService");local NpcFolder = workspace.NPC;PhysicsService:RegisterCollisionGroup("NPC");PhysicsService:CollisionGroupSetCollidable("NPC", "NPC", false);for _, NPC in NpcFolder:GetChildren() do
if NPC:IsA("Model") then
for _, Child in NPC:GetChildren() do
if Child:IsA("BasePart") then
Child.CollisionGroup = "NPC";
end;
end;
end;
end;