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 » Scripters
Home Search
 

how do i make npc attacks player only?

Previous Thread :: Next Thread 
G0LDDRAG0N is not online. G0LDDRAG0N
Joined: 27 May 2012
Total Posts: 6687
12 Mar 2015 02:27 AM
A script that makes an NPC or all ignores other npcs and only target player..?
Report Abuse
ChiefDelta is not online. ChiefDelta
Joined: 05 Nov 2010
Total Posts: 13071
12 Mar 2015 02:28 AM
IsA('Player') will help u
Report Abuse
G0LDDRAG0N is not online. G0LDDRAG0N
Joined: 27 May 2012
Total Posts: 6687
12 Mar 2015 03:28 AM
hmm... i have no idea what to do with that.
Report Abuse
G0LDDRAG0N is not online. G0LDDRAG0N
Joined: 27 May 2012
Total Posts: 6687
12 Mar 2015 07:20 PM
bump
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
12 Mar 2015 07:22 PM
findFirstChild("Humanoid") will help but idk where. I dont use AIs much.
Report Abuse
G0LDDRAG0N is not online. G0LDDRAG0N
Joined: 27 May 2012
Total Posts: 6687
12 Mar 2015 07:24 PM
ok imma try
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Mar 2015 07:24 PM
no no no

local function isPlayer(model)
return game.Players:GetPlayerFromCharacter(model) and model or nil
end
Report Abuse
G0LDDRAG0N is not online. G0LDDRAG0N
Joined: 27 May 2012
Total Posts: 6687
12 Mar 2015 07:29 PM
ook
Report Abuse
millymanks is not online. millymanks
Joined: 26 Jun 2014
Total Posts: 413
12 Mar 2015 07:31 PM
^^^^

or instead of game.Players:GetPlayerFromCharacter just make a variable like this.


local plr = game.Players:GetPlayers()
local idk = plr.Name
local char = workspace:findFirstChild(idk)

this might not be faster but its another way to get the player.
Report Abuse
CrescentJade is not online. CrescentJade
Joined: 07 Jul 2010
Total Posts: 5494
12 Mar 2015 07:34 PM
or no cuz u can name other models that players name.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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