Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make an explosion?

Asked by 9 years ago

I've got this code

01local Values = script.Parent.Values
02local Huge = 100000
03 
04Values.Boom.Changed:connect(function()
05    local Nuke = Instance.new("Explosion")
06    Nuke.Position = Main.Console.ConsoleM.Position
07    Nuke.BlastPressure = Huge
08    Nuke.BlastRadius = Huge
09    Nuke.ExplosionType = Enum.ExplosionType.CratersAndDebris
10end)

Can someone explain how to fix this?

5
Helps if you tell us what's wrong. I'll just tell you that Main is nil, and then wait for you to actually do this right. CailThePuppy 70 — 9y
1
Dam right about that Conmmander 479 — 9y

1 answer

Log in to vote
2
Answered by 9 years ago

I am not exactly sure what your error is but what I see is that your script doesn't know what to do. You can try this but I am not sure it will work.

1function Boom()
2    local Nuke = Instance.new("Explosion")
3    Nuke.Position = --"Main" .Console.ConsoleM.Position
4    Nuke.BlastPressure = 100000
5    Nuke.BlastRadius = 100000
6    Nuke.ExplosionType = Enum.ExplosionType.CratersAndDebris
7end
8Values.Boom.Changed:connect(Boom)

1 Last thing. the part I have in parathesis thats green is also your error. Define the "Main" so it knows what where to position it. If this doesn't work please define what your error is up above.

Ad

Answer this question