I used a piece of code from another question here so I could make explosive bricks, but I modified it and cant seem to get it to constantly repeat explosions.
local currentlyDelaying = false -- Don't touch this. if currentlyDelaying == false then repeat local exp = Instance.new("Explosion", script.Parent) exp.BlastPressure = 750000 -- The pressure of the explosion exp.BlastRadius = 5 -- The radius of the explosion exp.DestroyJointRadiusPercent = 400 -- The radius of where joints are destroyed upon impact exp.ExplosionType = Enum.ExplosionType.Craters -- What type of explosion do you want? Craters, CratersAndDebris, or NoCraters. exp.Position = script.Parent.Position -- The position of the explosion exp.Visible = false -- If the explosion can be seen wait(0.1) until wait(10) script.Parent:Destroy() end
local currentlyDelaying = false -- Don't touch this. if currentlyDelaying == false then local stopLoop = false spawn(function()-- spawn is basically running two scripts at once wait(10) stopLoop = true -- waiting for 10 seconds and then the loop stops end) while true do local exp = Instance.new("Explosion", script.Parent) exp.BlastPressure = 750000 -- The pressure of the explosion exp.BlastRadius = 5 -- The radius of the explosion exp.DestroyJointRadiusPercent = 400 exp.ExplosionType = Enum.ExplosionType.Craters exp.Position = script.Parent.Position exp.Visible = false if stopLoop == true then break -- breaks out of loop if stop loop is true end wait(0.1) end script.Parent:Destroy() end