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: Zombie goes up to WA WA WA!!!Help!

Previous Thread :: Next Thread 
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:13 PM
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:wait()
repeat wait() until p.Character:FindFirstChild("Humanoid")
while wait() do
script.Parent.Parent.Humanoid:MoveTo(p.Character.Torso.Position,p.Character.Torso)
local model = script.Parent.Parent
local backup = model:Clone()
model.Humanoid.Died:connect(function(h)
wait(8)
model:Remove()
model = backup:Clone()
model.Parent = Workspace
model:MoveTo(Vector3.new(0,0,0))
model:MakeJoints()
model.Humanoid.Health = 100
script.Parent.Parent:MoveTo(p.Character.Torso.Position,p.Character.Torso)
end)
end
end)


First the zombie does move to you and I thought YAY!IT WORKED!Well, when I kill the zombie it regens(spawns) but doesn't come after you. THEN when you kill it again it doesn't even spawn. Help?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:29 PM
Bump.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:30 PM
model is gone when you remove it, so model then is nil, so then model.Humanoid.Died gets disconnected.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
21 Nov 2011 08:30 PM
Wow a bump in like 5 mins?
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:32 PM
@Pokemon

like maybe 5 threads are created per 30 seconds. Do the math.

@King

Thanks, I'ma go fix and think.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:34 PM
But king...it clones.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:35 PM
It clones, but model goes away. The old model ~= the new one
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:38 PM
What if I change the event to an if statement?

if model.Humanoid.Health == 0 then

?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:38 PM
Nope.
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
21 Nov 2011 08:39 PM
@miz
You don't need to bump in 5 mins.
Get a clue.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:42 PM
pcall?

model.Parent = nil--I know that's not it

Should I remove the event?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:46 PM
No. Keep the event.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:50 PM
Is it in a wrong spot?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:52 PM
No.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 08:55 PM
What if I don't remove the model but remove the parts IN the model?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 08:56 PM
No.­
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 09:01 PM
Is it a method/event I need to add?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 09:04 PM
You need to add something. But it's not a method or an event.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 09:05 PM
function?

pcall?
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
21 Nov 2011 09:12 PM
Instead of guessing, use logic. That's what scripting is about, LOGIC. I've said this before, yet you don't seem to understand. Scripting isn't just about learning lines of code and certain ways to put them together, it's learning a language, and using your own logic to make the language do stuff for you.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 09:12 PM
Miz, you said you were smart enough to learn HTML, so I think you should be able to figure out this.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
21 Nov 2011 09:13 PM
Dang late toast.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 09:21 PM
From looking at the wiki I either think it's using a pcall or couritine.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
21 Nov 2011 10:09 PM
er, something about the way you write your code makes me not want to look at it ATM.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
21 Nov 2011 10:12 PM
I don't know what to use!I need another hint.
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