generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do I make a player only touch script

Previous Thread :: Next Thread 
krisk7 is not online. 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 is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Aug 2014 03:50 PM
if game.Players:GetPlayerFromCharacter(touched:Parent) then
Report Abuse
iiEssence is not online. iiEssence
Joined: 18 Jun 2014
Total Posts: 3467
21 Aug 2014 03:51 PM
touched.Parent**
Report Abuse
krisk7 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image