krisk7
|
  |
| Joined: 24 Aug 2013 |
| Total Posts: 254 |
|
|
| 21 Aug 2014 03:43 PM |
| So I have a script that gets activate on touch. The only problem is this gets activate when my NPC's touch the brick so I was wondering if it's possible to add something to my script to make it so only the player can activate the script and not the NPC. |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 21 Aug 2014 03:50 PM |
| if game.Players:GetPlayerFromCharacter(touched:Parent) then |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
| |
|
krisk7
|
  |
| Joined: 24 Aug 2013 |
| Total Posts: 254 |
|
|
| 21 Aug 2014 05:48 PM |
Now the script doesn't work at all. Here's what the script looks like:
script.Parent.Touched:connect(function() script.Parent.Parent.NPC.WalkToPoint = script.Parent.Parent.Parent.PointF.Position end)
|
|
|
| Report Abuse |
|
|
krisk7
|
  |
| Joined: 24 Aug 2013 |
| Total Posts: 254 |
|
|
| 22 Aug 2014 04:04 PM |
| I still can't figure out why it's not working. |
|
|
| Report Abuse |
|
|