|
| 03 Oct 2017 02:56 AM |
Hello, I am a fellow scripter like you are! But, I need help on this one thing There is a game I am currently making with a constant of a Pathfinding NPC, I want to make the NPC go through the door but I want to make the non-NPC (Players) not go through the door its self. Can you help me on this script? If so post it in the comments below cause I need it fully, I cant even script it good!
-Xenil |
|
|
| Report Abuse |
|
|
|
| 03 Oct 2017 04:59 AM |
| You can make this using filtering. Make the door CanCollide locally, and make the NPC implementation on the server's side. That way the PathfindingService will make the path go through it, while the player is restricted. |
|
|
| Report Abuse |
|
|
soutenu
|
  |
| Joined: 09 Dec 2011 |
| Total Posts: 1021 |
|
| |
|
|
| 03 Oct 2017 06:09 AM |
Reference the play with a parameter.
script.Parent.Touched:connect(function(hit) if hit.Parent.Name == "NPC NAME" then --do code for npc
--in here
else -- if a human then --do stuff
--ya end
|
|
|
| Report Abuse |
|
|
|
| 04 Oct 2017 04:47 AM |
| Thanks for the suggestions! |
|
|
| Report Abuse |
|
|