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: AI is dying when moved?

Previous Thread :: Next Thread 
101PILOT is not online. 101PILOT
Joined: 28 Dec 2010
Total Posts: 960
05 Dec 2013 10:28 AM
For some reason this AI is dying when I move it and I am not sure how to fix this.

NewAIEnemy = game.ReplicatedStorage.AI

while true do
o = game.Workspace.Doors:GetChildren()
g = o[math.random(#o)]

g.Transparency = 1
g.CanCollide = false

-------this is that pat that makes and moves the AI----------

local NewAI = NewAIEnemy:Clone()
NAI = NewAI:GetChildren()
NAI.Anchored = true
NewAI.Parent = Workspace
NewAI:MoveTo(g.Part.Position)
NewAI.Humanoid.Health = 100
NewAI:MakeJoints()
NAI.Anchored = false

-------------------------------------------------
wait(10)

g.Transparency = 0
g.CanCollide = true

end
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
05 Dec 2013 11:34 AM
Maybe you should parent it first, then make joints and then do the rest.
Report Abuse
101PILOT is not online. 101PILOT
Joined: 28 Dec 2010
Total Posts: 960
05 Dec 2013 04:51 PM
It still doesn't work :/
Report Abuse
Absurdism is not online. Absurdism
Joined: 18 Jul 2013
Total Posts: 2568
05 Dec 2013 04:57 PM
Parent it after MakeJoints.
Report Abuse
101PILOT is not online. 101PILOT
Joined: 28 Dec 2010
Total Posts: 960
05 Dec 2013 05:15 PM
For some reason it just won't
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
05 Dec 2013 05:17 PM
I had the same problem but when I tried it with my own character it worked fine. Its probably just a problem with the character that can be fixed but I'm not a builder so I don't know what it is. One thing it could be is that the surfaces aren't correct.
Report Abuse
101PILOT is not online. 101PILOT
Joined: 28 Dec 2010
Total Posts: 960
05 Dec 2013 05:20 PM
What do you mean by the surfaces not being correct?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
05 Dec 2013 05:29 PM
I think the problem is the anchoring. Dont anchor it?
Report Abuse
101PILOT is not online. 101PILOT
Joined: 28 Dec 2010
Total Posts: 960
05 Dec 2013 05:39 PM
Still Nothing :/
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