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
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 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 |
|
|
|
| 21 Nov 2011 08:30 PM |
| Wow a bump in like 5 mins? |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 21 Nov 2011 08:35 PM |
| It clones, but model goes away. The old model ~= the new one |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
|
| 21 Nov 2011 08:39 PM |
@miz You don't need to bump in 5 mins. Get a clue.
|
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
| |
|
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 |
|
|
| |
|
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 |
|
|
|
| 21 Nov 2011 09:04 PM |
| You need to add something. But it's not a method or an event. |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
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
|
  |
| 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
|
  |
| 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 |
|
|