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

local Values = script.Parent.Values
local Huge = 100000

Values.Boom.Changed:connect(function()
    local Nuke = Instance.new("Explosion")
    Nuke.Position = Main.Console.ConsoleM.Position
    Nuke.BlastPressure = Huge
    Nuke.BlastRadius = Huge
    Nuke.ExplosionType = Enum.ExplosionType.CratersAndDebris
end)

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.

function Boom()
    local Nuke = Instance.new("Explosion")
    Nuke.Position = --"Main" .Console.ConsoleM.Position
    Nuke.BlastPressure = 100000
    Nuke.BlastRadius = 100000
    Nuke.ExplosionType = Enum.ExplosionType.CratersAndDebris
end
Values.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