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

Why isn't this explosion script working? (beginner question don't judge me)

For some reason, it puts in an explosion but doesn't explode. I also need to put in checks because it is putting in multiple, but I don't know how. nothing is showing up in output.

script.Parent.Touched:Connect(function(hit)
	local lol = Instance.new("Explosion")
	lol.Name = "explosion"
	lol.BlastPressure = 1000
	lol.BlastRadius = 100
	lol.Parent = script.Parent
	lol.Visible = true
	if lol ~= nil then
		wait(.1)
		script.Parent:Destroy()
	end
	
end)

3 comments

0

You parented the explosion to the item you're destroying on line 10

0

I want it to explode then destroy

0

You didn't position the explosion to the parent's position

1 answer

✓ Accepted answer

give the explosion a position

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