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

script isn't creating an explosion effect?

Asked by
Rdumb1 4
4 years ago

I'm making a game where you do missions, basically, I just create separate games that are called missions.

I scripted this without tutorials or wikis since I couldn't find any. The script creates an explosion by instance.new but it isn't working. Did I do it incorrectly? if so, please explain. Thank you!

script:

wait(1)
Instance.new("Explosion", script.Parent)
Explosion.BlastPressure = 100000
Explosion.BlastRadius = 100
end

I am of course a newbie at this so please explain what's wrong with it.

0
I changed the 'wait()' part to test if it was working to 1. Rdumb1 4 — 4y

1 answer

Log in to vote
0
Answered by
vkax 85
4 years ago

Hello, there's 2 problems with your code. First of all, you haven't defined a function of any sorts so you'd have to eliminate the end. Second of all, you have to locate where the Explosion is.

Here's what a finished example would be

wait(1)
local Explosion = Instance.new("Explosion", script.Parent)
Explosion.BlastPressure = 100000
Explosion.BlastRadius = 100

If this hasn't answered your question, please feel free to respond to me, please don't just automatically down vote me. Thanks :)

0
Thanks! Rdumb1 4 — 4y
0
but I do still have a problem with the positioning, I added Explosion.Position = -2.6, 4.3, -117.9 and it ain't working, the explosion is still inside the part but explodes in the middle of the baseplate? any help? Rdumb1 4 — 4y
0
Sorry for the late delay, make the parent equal to workspace (same as game.Workspace), reply if you need any more help :) vkax 85 — 4y
Ad

Answer this question