Hi, I’m new to scripting, so I don’t understand many things. I’m trying to make an explosion that includes smoke and sound that happens at a random time in between 10 to 30 seconds. I’ve looked at other scripts for help, but I couldn’t figure it out!
Workspace:
The parenting made the explosion work, so thank you for that!
But some things are still not working as wanted, such as:
Explosions are happening at a constant pace, not random
No smoke.
the updated script:
Dust = script.Parent.Smoke
Howlong = script.Parent["Value"].Value
while true do
Dust = false
Howlong = math.random(10,30)
script.Parent.FIRE:Play()
wait(4)
Ex = Instance.new("Explosion")
Dust = true
Ex.BlastPressure = 5000
Ex.BlastPressure = 4
Ex.Position = script.Parent.Position
Ex.Parent = workspace
wait(3)
Dust = false
end
Ok I will add Enabled
When I said “Random” what I meant to say is anywhere in-between of 10 to 30 seconds
Also, the sound includes the firing of the cannon and the actual explosion, which I should have said. So I want to play the sound then wait for the explosion.
Sound: https://www.roblox.com/library/3850233766/Shot