ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 27 Oct 2012 11:47 PM |
zombiehum = script.Parent.Humanoid player = (game.Players:GetPlayers()) while true do wait() for i, v in pairs(game.Players:GetPlayers()) do if v:IsA("Player") then c = v.Character.Torso.Position zombiehum:MoveTo(c, Workspace.Base)
end end end ----------- How do I make it more efficient? Doesn't seem to hard but the problem is he targets 1 person when that person dies he targets the next person forever... |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
| |
|
|
| 28 Oct 2012 12:20 AM |
Take NPC Wait Animation,
or for AI, take Speed AI
|
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:22 AM |
zombiehum = script.Parent.Humanoid
function getClosestPlayer() local max, found = 5000 for _, v in pairs(game.Players:GetPlayers()) do if v.Character and v.Character:FindFirstChild("Torso") then local mag = (v.Character.Torso.Position-script.Parent.Torso.Position).magnitude if mag < max then max = mag found = v end end return found end
while true do wait() local c = getClosestPlayer().Character.Torso.Position zombiehum:MoveTo(c, Workspace.Base) end |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 28 Oct 2012 12:26 AM |
| Dang.. it worked and your awesome. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:27 AM |
"Dang.. it worked"
I know.
" and your awesome."
I know. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:29 AM |
| I remember looking back at AFF a couple years back, I thought he was epic cause of his name. |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:30 AM |
Funny thing I didn't even create this account. My brother did. XD MY account's name is GamingPro.
>_> |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:32 AM |
Lol'd
http://www.roblox.com/User.aspx?ID=527254 |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:38 AM |
Yeah he showed me this game and I made GamingPro and he was like "that's a dumb name let me make you a better name." Then he made this account for me.
XD |
|
|
| Report Abuse |
|
|
ninja5566
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 5233 |
|
|
| 28 Oct 2012 12:38 AM |
May I ask for a bit more help please?
http://www.roblox.com/Forum/ShowPost.aspx?PostID=80982939 |
|
|
| Report Abuse |
|
|
|
| 28 Oct 2012 12:41 AM |
> I remember at AFF a couple years back, I thought he was epic cause of > his name. looking back
Yeah, he's not epic anymore, right? :P
¤ ¤ †KMXD† ¤ ¤ |
|
|
| Report Abuse |
|
|