koen523
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 4026 |
|
|
| 27 Feb 2014 06:37 AM |
name="Ore"
robo=script.Parent:clone()
while true do
wait(150)
if script.Parent.Ore.Health < 1 then
robot=robo:clone()
robot.Parent=script.Parent.Parent
robot:makeJoints() script.Parent.Ore.Health = script.Parent.Ore.MaxHealth
script.Parent:remove()
end
end
Error: Workspace.[Qarxum Meteor Rock] Hits Left: 100.Respawn:13: attempt to index field 'Parent' (a nill value)
What does this means..? -.- How do I fix this? PLEASE HELP
|
|
|
| Report Abuse |
|
|
koen523
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 4026 |
|
|
| 27 Feb 2014 06:38 AM |
The error is at line 13:
if script.Parent.Ore.Health < 1 the |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 06:43 AM |
| you probably referenced Ore wrong |
|
|
| Report Abuse |
|
|
koen523
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 4026 |
|
|
| 27 Feb 2014 06:53 AM |
| Could you explain that please? |
|
|
| Report Abuse |
|
|
koen523
|
  |
| Joined: 23 Feb 2011 |
| Total Posts: 4026 |
|
|
| 27 Feb 2014 06:54 AM |
| 'Ore' is the name of the humanoid. |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 27 Feb 2014 06:57 AM |
| Give us your full hierarchy. |
|
|
| Report Abuse |
|
|
|
| 27 Feb 2014 07:48 AM |
It's strange that you are making clone 1: robo=script.Parent:clone() and then making a clone of that clone robot=robo:clone() Now I've never tried this so it may be completely allowed, but since you're having a .Parent field access problem, and we can't see your actual line numbers, it's happening either here:
robot.Parent=script.Parent.Parent or if script.Parent.Ore.Health < 1 then Either the script's parent is nil (Which I doubt, since it wouldn't still be running) or the robot's Parent is nil, which may have something to do with it being a clone of a clone that never got put into anything.
I'd suggest to try changing
robot=robo:clone() to robot=robo.Parent:clone() and tell us which line '13' is |
|
|
| Report Abuse |
|
|