This isn't a CanCollide Properties setting, this is where if a npc/model (like a zombie) collides with a wall, that they can walk through it, but a player can't. I couldn't think of anything and does someone have a solution?
COMMUNITY QUESTION
How do I make it so if a npc collides with a wall, they can walk through it?
1 answer
wallpart.Touched:connect(function(h)
isnpc = h.Parent:FindFirstChild('Humanoid')
if isncp ~= nil and h.Parent.Name = "npc name"
wallpart.CanCollide = false
wait(2)
wallpart.CanCollide = true
end
end)
2 comments
0
this script only allows it to find players in the game, not npcs
0
He is assuming that if it isn't a player, then it must to be an NPC
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
You could just make a wall, then add a script into it that makes them teleport to the other side only for specific npcs.