I am currently making a door script that will open when a specific NPC touches it by using OnTouch function (or by magnitude, if not possible). The door will move two bricks once the door it's supposed to be opened (the default way of opening it is by clicking on a button):
door1.CFrame = door1.CFrame * CFrame.new(-0.125, 0, 0)
door2.CFrame = door2.CFrame * CFrame.new(-0.125, 0, 0)
Is there a way to make this happen when the NPC actually touches the door by having this function in the door's actual script (I already tried OnTouch, but it won't work).

1 comment
You should be able to use the part.Touched event because it fires when any part touches that part. Then it's as simple as checking if the part's parent is either an NPC or player by looking for a humanoid.