Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why isn't my instance.new for an explosion working?

I had a script where it would wait a little under 3 minutes, and then explode. However, said script is broke, and I don't see what's wrong with it.

wait(160)
local x = Instance.new("Explosion")
x.Position = script.Parent.Position
x.BlastRadius = 100
x.BlastPressure = 10000000000000000000

1 answer

What you have done wrong is that when an instance is created, its first parent is nil (nothing), you need to set a parent for it and it should work just as perfect.

server script tho!

wait(160) -- 3 mins :o
local x = Instance.new("Explosion")
x.Position = script.Parent.Position
x.BlastRadius = 100
x.BlastPressure = 10000000000000000000
x.Parent = game:GetService("Workspace")

1 comment

0

you set the parent last, for optimization, not right after yuo create the instance

This discussion is preserved as it was. New answers, comments, and votes are closed.