I don't understand what I'm doing wrong, I created a bomb that explodes and it works except for one thing. The explosion itself just doesn't work, it doesn't explode even though I destroyed it and set its position. Please do help.
local TimeF = math.random(1)
local Intermission = workspace.Elevator["Elevator Door"].OpenandClose.Intermission
wait(10)
Intermission.Changed:Connect(function()
if Intermission.Value == 1 then
script.parent.Floors.Value += 1
if script.parent.Floors.Value == TimeF then
local explosionPart = script.parent.base
local explosion = Instance.new("Explosion",game.Workspace)
explosion.Position = explosionPart.Position
explosion.Visible = true
explosion.DestroyJointRadiusPercent = 1
explosion.BlastRadius = 4
explosion.BlastPressure = 500000
explosion:Destroy()
script.parent.base.explode:Play()
script.parent.base.Transparency = 1
script.parent.Part.Transparency = 1
script.parent.Part2.Transparency = 1
wait(3.84)
script.parent:Destroy()
end
end
end)
