|
| 21 Mar 2014 03:38 PM |
Ok, so I've been working on a game, and I've made this script that makes it so that it spawns zombies (aliens) every few minutes. It works great, but the only problem is that when the zombie spawns, it's dead. Basically, the head seems to fall wherever it wants, but the torso stays upright. I don't know why, though. Here's the script. By the way, the only part that doesn't work is the health, the checking seems all right. Script:
while true do newalien = game.StarterGui.lvlonealien:clone() newalien:MakeJoints() newalien.Torso.Position = Vector3.new(-128.435, 7.199, -26.033) newalien.Name = (" ") newalien.Parent = game.Workspace newalien.Alien.Health = 100 newalien.Alien.MaxHealth = 100 wait(60) if newalien == nil then return end if newalien ~= nil then wait(30) if newalien == nil then return end if newalien ~= nil then wait(20) if newalien == nil then return end if newalien ~= nil then return end end end end |
|
|
| Report Abuse |
|
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 21 Mar 2014 05:02 PM |
| Try MakeJoints() after you set it's parent to workspace. Not sure. |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Mar 2014 05:50 PM |
newalien.Parent = Workspace newalien:MakeJoints() newalien.Alien.MaxHealth = 100 newalien.Humanoid.Health = newalien.Alien.MaxHealth newalien:MakeJoints() |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 08:16 PM |
while true do newalien = game.StarterGui.lvlonealien:clone() newalien:MakeJoints() newalien.Parent = Workspace newalien:MakeJoints() newalien.Alien.MaxHealth = 100 newalien.Alien.Health = 100 newalien:MakeJoints() newalien.Torso.Position = Vector3.new(-128.435, 7.199, -26.033) newalien.Name = ("lvlonealien") wait(60) if newalien == nil then return end if newalien ~= nil then wait(30) if newalien == nil then return end if newalien ~= nil then wait(20) if newalien == nil then return end if newalien ~= nil then return end end end end
Still doesn't work. By the way, "Alien" is the name for Humanoid in my model. I don't know if that is the thing killing the model once it's cloned. |
|
|
| Report Abuse |
|
|
|
| 21 Mar 2014 08:23 PM |
| I think the problem is that it's teleporting the Torso, but nothing else. Is this a problem with the "MakeJoints", or do I just have to teleport each and every body part? |
|
|
| Report Abuse |
|
|