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: Explode and destroy egg script not working :C

Previous Thread :: Next Thread 
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 07:31 AM
Im currently editing a game,and im trying to script this egg to create a harmless explosion and destroy the egg. and its not working.
Script looks like this:
wait(60)
DeathBoom = Instance.new "Explosion"
DeathBoom.BlastRadius = 500000
DeathBoom.BlastPressure = 0
DeathBoom.Position = game.Workspace.AgonizinglyUglyFaberge.Position
Script.Parent = Destroy()
The output says line 6 is trying to index "AgonizinglyUglyFaberge (A nil Value)" (the egg) and wont let it work.
and if i remove line 6,the script does nothing.
i odnt know what to do,but again,im not a good scripter :s
i also have no idea what nil values are.
Report Abuse
godphantom555 is not online. godphantom555
Joined: 12 Mar 2011
Total Posts: 360
05 May 2013 07:32 AM
DeathBoom.Position = script.Parent.Position
Report Abuse
godphantom555 is not online. godphantom555
Joined: 12 Mar 2011
Total Posts: 360
05 May 2013 07:33 AM
script.Parent:Destroy()
Report Abuse
godphantom555 is not online. godphantom555
Joined: 12 Mar 2011
Total Posts: 360
05 May 2013 07:34 AM
wait(60)
DeathBoom = Instance.new("Explosion")
DeathBoom.BlastRadius = 500000
DeathBoom.BlastPressure = 0
DeathBoom.Position = script.Parent.Position
wait(1/30)
script.Parent:Destroy()
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 08:13 AM
godphantom,youre script DOES get rid of the egg,but the explosion doesnt show.
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 08:14 AM
Anyone else can help me with this?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
05 May 2013 09:23 AM
wait(60)
DeathBoom = Instance.new("Explosion")
DeathBoom.BlastRadius = 500000
DeathBoom.BlastPressure = 0
DeathBoom.Position = Vector3.new(script.Parent.Position.X, script.Parent.Position.Y, script.Parent.Position.Z)
wait(1/30)
script.Parent:Destroy()

Try that.
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 09:37 AM
IT still wont show the explosion. GRR!
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 10:01 AM
I figuered out the problem :D
i needed to put "DeathBoom.Parent = Workspace"
now the explsoion shows! :D
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
05 May 2013 10:02 AM
Lol didn't catch that.
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
05 May 2013 05:52 PM
Yeah...i guess why it wasnt working was because it was being inserted into game,that line makes the explosion go into workspace and show up :P
Report Abuse
icegroudon is not online. icegroudon
Joined: 08 Oct 2011
Total Posts: 2924
18 Jul 2013 04:02 PM
My old old old thread..from a time where i was new to foruming and didnt know that i had to define the explosions parent or else the parent would be nil....
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