How to make npcs and players not collide

yeah you were using obj.HumanoidRootPart.CanCollide = false; you must use a STEPPED loop and set the cancollide property of EVERY part inside the npcs to false

2 Likes

Can’t the player then walk through walls? I don’t think thats intended. :confused:

2 Likes

Ok I just realised that making the humanoid root part not collideable is not enough to make it not collide at all. I think you have to make everything not collideable but the humanoid root part.

1 Like

@MrGuyROBLOX @EmeraldLimes @ProspektNova @metaindex

CanCollide false is not reliable, as Physics Service is the one to rely on in this case. CanCollide can be often glitchy in this case.



To answer your question, you don’t need a spawn function or any kind of loop every second:

spawn(function()

Simply just eliminating that is fine. But if you have to do that because there are NPC’s that are constantly being added through the game, consider using InstanceAddedSignal from Collection Service instead. You can also use ChildAdded in this case.


You can tag each NPC as the CollisionGroup called, “Player” instead, only if the players don’t have special collisions that NPC’s don’t or vice versa. But if they do, consider trying the suggestions below.


  1. Change :GetChildren to :GetDescendants
  2. Change b:IsA("Part") to b:IsA("BasePart")
  3. Change :FindFirstChildOfClass("Humanoid") to :FindFirstChildWhichIsA("Humanoid")
9 Likes