im trying to make a script that turns off collisions for npcs so that they dont collide into one another, but its not working:
the script is a server script btw
local PhysicsService = game:GetService("PhysicsService") local NPCGroup = PhysicsService:CreateCollisionGroup("NPCS") PhysicsService:CollisionGroupSetCollidable("NPCS", "NPCS", false) while true do wait(0.1) for i, v in pairs(workspace:GetChildren()) do if v:IsA("BasePart") and v.Parent:FindFirstChildOfClass("Humanoid") then PhysicsService:SetPartCollisionGroup(v, "NPCS") end end end