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: Weird error.... Help qq

Previous Thread :: Next Thread 
koen523 is not online. 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 is not online. 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
MarioKartAddict is not online. MarioKartAddict
Joined: 11 Nov 2009
Total Posts: 42774
27 Feb 2014 06:43 AM
you probably referenced Ore wrong
Report Abuse
koen523 is not online. koen523
Joined: 23 Feb 2011
Total Posts: 4026
27 Feb 2014 06:53 AM
Could you explain that please?
Report Abuse
koen523 is not online. koen523
Joined: 23 Feb 2011
Total Posts: 4026
27 Feb 2014 06:54 AM
'Ore' is the name of the humanoid.
Report Abuse
maxomega3 is not online. maxomega3
Joined: 11 Jun 2010
Total Posts: 10668
27 Feb 2014 06:57 AM
Give us your full hierarchy.
Report Abuse
xFortunato is not online. xFortunato
Joined: 25 Nov 2010
Total Posts: 865
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
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