Hey im currently making a walking npc and i really want to know how i disable the cancollide of the player. Everyone in my game is disturbing the movement of the NPC while he is walking. Is there a way that no one can disturb the NPC its movement?
Sincerly Nathan EggService The Netherlands
Hello! I found this earlier, its called Collision Filtering Try this maybe? I didn't test it, but I hope this worked. Also if this doesn't work, or no one can answer there is some other articals and stuff around the internet. Hopefully this helps.
local PhysicsService = game:GetService("PhysicsService") npcGroup = "npcGroup" PhysicsService:CreateCollisionGroup(npcGroup) PhysicsService:CollisionGroupSetCollidable(npcGroup, npcGroup, false) local function setCollisionGroupRecursive(object) if object:IsA("BasePart") then PhysicsService:SetPartCollisionGroup(object, npcGroup) end for _, child in ipairs(object:GetChildren()) do setCollisionGroupRecursive(child) end end npc = workspace.NPC setCollisionGroupRecursive(npc)