How to make a volcano erupt?

Continuing the discussion from How would you make a volcano shoot out parts?


Ok so I was looking at this topic ^^ for help but I didn’t understand all the BodyVelocities, Angular Velocities, stuff like that (I haven’t had much experience in that area).

So I want to do like the same thing (kinda, but a low-poly volcano, not a terrain volcano) but I will need to have more information for the Body stuff.

Thank you!

4 Likes

It’s a Body Velocity.
Or you can simple edit the Parts velocity tho

Ok… I get it is a Body Velocity?

Do I literally just have to use a body velocity?

Or editing part velocity
If you use body velocity you have to adjust it

So I made a simple part move upwards, but now I want it to go like this:


instead of this:

Perhaps you could use a Cosine graph in terms of movement and go from 0 to PI and it should make a smooth curve. math.cos(x)

(You can also stretch the curve if you like too)
image

1 Like

Have an explosive body velocity by having the force very high, and some one or 2 seconds later delete the body velocity, this should make the block go down.

1 Like

I made this simple volcano script under few minutes. It will make simple part explosion.

First Step - Create a part and put inside your volcano (anchor it, and set transparency to 1)

Second Step - Create and put script inside of the part you just created

image

Third Step - Copy and paste this script to the script you just created

local Spawner = script.Parent
Spawner.Transparency = 1 -- Make the spawner invisible
Spawner.CanCollide = false -- Make the spawner not collide
function explode() -- Function that creates volcano like explosion when triggered (or called)
	local ExplosionHeight = 100 -- Determinates on how high the explosion will be (in studs)
	for a = 5, 0, -1 do -- Repeat stuff inside 5 times (which will make 250 parts in total (50 * 5 = 250)
		for i = 50, 0, -1 do -- Create 50 parts
			local p = Instance.new("Part") -- Create part
			p.Size = Vector3.new(3, 3, 3) -- Set size of parts (you can play around it, to make lava smaller or bigger)
			p.Position = Spawner.Position -- Set position of parts to the spawner position
			p.Anchored = false -- Unanchor parts
			p.CanCollide = true -- Make the parts collide
			p.Velocity = Vector3.new(math.random(-100, 100), ExplosionHeight, math.random(-100, 100)) -- Push the blocks up and put them in different directions using velocity
			p.BrickColor = BrickColor.new("Persimmon") -- Give the parts some color
			p.Material = Enum.Material.Neon -- Set material to neon
			p.Parent = workspace -- Put parts into workspace
			game:GetService("Debris"):AddItem(p, 10) -- Remove parts after 10s to prevent lag
		end
		wait() -- Prevent lag spikes
	end
end
explode() -- Trigger Explosion

Fourth Step - Watch it explode when you run it!

You can also play with the values to make some different verities of explosions, just don’t set the loop values too high, so it doesn’t create too many blocks at the same time which can lead to crash or an extreme lag.

If you want the lava to deal damage to the players, just create an event on .Touched, for each created part (which is variable p) and then create damage code inside of that event.

12 Likes