while true do explosion = Instance.new("Explosion") explosion.BlastPressure = 10000 explosion.BlastRadius = 50 explosion.DestroyJointRadiusPercent = .3 explosion.Position = (math.random),(math.random),(math.random) wait(math.random(1,8)) end
I want it to generate random explosions everywhere with these traits. I need help, and was wondering if one of you guys could help.
local waitTime = 1 -- Every 1 second the script will repeat again. Change to what you want. while wait() do wait(waitTime) local part = Instance.new("Part",game.Workspace) part.Position = Vector3.new(math.random(-300,300)),(math.random(-300,300)),(math.random(-300,300)) part.Anchored = true part.Transparency = 1 part.CanCollide = false local Explosion = Instance.new("Explosion",part) Explosion.BlastPressure = 10000 Explosion.BlastRadius = 50 Explosion.Position = part.Position ExplosionType = "CratersAndDebris" wait(1) part:Destroy() Explosion:Destroy() end
while true do explosion = Instance.new("Explosion") explosion.BlastPressure = 10000 explosion.BlastRadius = 50 explosion.DestroyJointRadiusPercent = .3 explosion.Parent = workspace explosion.Position = Vector3.new( (math.random),(math.random),(math.random)) wait(math.random(1,8)) end
Change the math.randoms to math.random(x,y) with x being the minimum number and y being maximum.