|
| 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 |
|
|
|
| 05 May 2013 07:32 AM |
| DeathBoom.Position = script.Parent.Position |
|
|
| Report Abuse |
|
|
| |
|
|
| 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 |
|
|
|
| 05 May 2013 08:13 AM |
godphantom,youre script DOES get rid of the egg,but the explosion doesnt show.
|
|
|
| Report Abuse |
|
|
|
| 05 May 2013 08:14 AM |
| Anyone else can help me with this? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 05 May 2013 09:37 AM |
| IT still wont show the explosion. GRR! |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 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 |
|
|