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
 

Re: AI can't respawn.

Previous Thread :: Next Thread 
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
23 Jan 2015 03:29 PM
Man, I am making an AI with this script, I took it from a free model:

zombo = script.Parent:Clone()

while true do
wait(10)
if script.Parent.Humanoid.Health <= 1 then
zombie = zombo:Clone()
zombie.Parent = script.Parent
zombie:makeJoints()
script.Parent:remove()
end
end

I tried and tried to fix, but the character only disappears.
Report Abuse
SuperJedi224 is not online. SuperJedi224
Joined: 11 Jul 2008
Total Posts: 110
23 Jan 2015 03:50 PM
change script.Parent to game.Workspace on line 7 ONLY.
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
23 Jan 2015 03:59 PM
Nope.
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
23 Jan 2015 04:19 PM
It doesn't even work.
Report Abuse
SuperJedi224 is not online. SuperJedi224
Joined: 11 Jul 2008
Total Posts: 110
23 Jan 2015 04:28 PM
Here's what I meant:

local zombo = script.Parent:Clone()

while true do
wait(10)
if script.Parent.Humanoid.Health <= 1 then
local zombie = zombo:Clone()
zombie.Parent = game.Workspace
zombie:makeJoints()
script.Parent:remove()
end
end
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
23 Jan 2015 04:38 PM
Just put local?
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
23 Jan 2015 04:41 PM
Nope, it doesn't work and I will not quit!
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
23 Jan 2015 04:54 PM
Any output? Also, use the Humanoid.Died event.
Report Abuse
SuperJedi224 is not online. SuperJedi224
Joined: 11 Jul 2008
Total Posts: 110
24 Jan 2015 03:03 PM
@stickmaster: Look also at line 7 in my version compared to yours. Mine says zombie.Parent=game.Workspace. Yours says zombie.Parent=script.Parent.
Report Abuse
apricotdew is not online. apricotdew
Joined: 21 Aug 2012
Total Posts: 427
24 Jan 2015 03:13 PM
zombo = script.Parent:Clone()

while true do
script.Parent.Humanoid.Died:connect(function()
zombie = zombo:Clone()
zombie.Parent = script.Parent
zombie:makeJoints()
script.Parent:remove()
end)
end
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