|
| 06 Jan 2014 08:42 PM |
Hey guys, making an RPG game but having an issue with the respawning! For example, after killing the mob (enemy) for example, sometimes, the arms and legs of the mob will disappear, and only the torso, head, and weapon (sword) will spawn. Here is the script in the mob to respawn :
name="Human"
robo=script.Parent:Clone()
function PwntX_X() wait(8) if script.Parent.Human.Health<1 then robot=robo:Clone() robot.Parent=script.Parent.Parent robot:MakeJoints() robot.Human.Health = robot.Human.MaxHealth script.Parent:Remove() end end
script.Parent.Human.Died:connect(PwntX_X)
Everything seems to be right (yes the mob's humanoid is called Human), so I can't figure out what's wrong! Please help me out, thanks! Feel free to message me or test out the game to see what I mean (It's my only current game). Thanks!! The Apple |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2014 08:56 PM |
| Try a weld script. Or weld the arms to the torso and the legs to the bottom of the torso. Also, you could try a more-advanced weld. |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 04:29 PM |
| Okay I will try that, thanks! I will let you know if that works..! |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 04:30 PM |
| try not using free models for a start. |
|
|
| Report Abuse |
|
|
Bebee2
|
  |
| Joined: 17 May 2009 |
| Total Posts: 3985 |
|
|
| 07 Jan 2014 04:32 PM |
| What I do is clone a copy of the humanoid, when the humanoid dies I :MakeJoints() the clone and make the clone's parent to workspace and clean up the mess of the original. |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 04:34 PM |
| So the left arm, and right arm, and right leg, and left leg, have nothing in them. But in the torso there is left hip, left shoulder, right hip, and right shoulder! Also, the right arm does have weld to the sword and it's working.. just the arms and legs! Thanks again |
|
|
| Report Abuse |
|
|
|
| 07 Jan 2014 04:40 PM |
| @ block the only free model that I used was a starter kit - I made all of the map and stuff. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 08 Jan 2014 06:55 PM |
check to see if it has legs and/or arms
if it doesn't then just respawn the mob. |
|
|
| Report Abuse |
|
|
|
| 08 Jan 2014 07:28 PM |
| Yes.. It deffinetley does! :P |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Jan 2014 12:52 PM |
| I meant to create a function in the script that checks to see if the mob has arms and legs. Not to actually check yourself. |
|
|
| Report Abuse |
|
|