Skip to content

Exercise 13: A ground slam that throws rubble

Purpose. To throw chunks of rubble outward from a point, have them land and settle on the floor, and puff dust where each one lands.

Sparks pass through the floor. Rubble must not: it has to arc, hit the ground, bounce once or twice, and lie still. The Rocks emitter does that. It is made with Transform as, like the Camera Shake of Exercise 11 and the Lightning of Exercise 12.

  • The workspace has a floor that parts can collide with.
  • One new Part named Rubble sits a little above the floor, with Size 2, 2, 2, Material Slate and a grey colour. Every chunk will be a duplicate of this Part.
  • The Sparks emitter from Exercise 12 is in the workspace. It will serve as the dust.

Steps 1, 2, 7 and 8 repeat earlier exercises.

StepControlActionResult
1RubbleSelect. Press ▾ beside Transform, then Transform as Rocks.Rubble turns invisible. The Emit box reads 1.
2HUD ▸ Emit buttonPressBetween six and ten chunks of different sizes hop about 2 studs into the air, fall, and come to rest on the floor. Near the end of their three seconds they sink into the floor and are gone.
3Properties ▸ Motion ▸ Launch SpeedEnter 50, 80No change yet.
4Properties ▸ Spawn ▸ Burst ModeSet to RingNo change yet.
5Properties ▸ Motion ▸ SpreadAngleEnter 30No change yet.
6HUD ▸ Emit buttonPressThe chunks leave in a ring, evenly spaced around Rubble, thrown outward and 30 degrees upward. Each rises between about 1.5 and 4 studs, lands some way off, bounces, slides, and lies flat on one face.
7Properties ▸ Events ▸ On HitExpand Events. Switch On Hit on.The rows of the On Hit block appear.
8On Hit ▸ Emit ▸ …Press. Click Sparks. Press Set.The Emit row shows the path to Sparks.
9HUD ▸ Emit buttonPressOne burst of sparks goes off, at the spot where the first chunk lands.
10Properties ▸ Motion ▸ Hit Per ChunkSwitch onNo change yet.
11HUD ▸ Emit buttonPressEvery chunk throws its own burst of sparks where it first lands.

A Rocks emitter throws a burst of chunks. One particle is one whole burst, so an Emit count of 2 means two bursts. Each chunk is a duplicate of the Part, at a size of its own.

RowStarts atWhat it sets
Spawn ▸ Chunks6, 10How many chunks are in a burst. At most 32.
Spawn ▸ Chunk Scale0.5, 1.5The size of each chunk, as a multiple of the Part’s size. A 2 stud Part gives chunks from 1 to 3 studs.
Spawn ▸ Burst ModeDirectionalDirectional throws every chunk the same way, spread by SpreadAngle. Ring spaces the chunks evenly in a circle and throws them outward.
Motion ▸ Launch Speed30How hard each chunk is thrown, in studs per second.
Motion ▸ Gravity196.2The downward pull, in studs per second per second. This is Roblox’s own gravity.
Motion ▸ Bounciness0.3, 0.5The share of its speed a chunk keeps at each bounce, from 0 to 1.
Motion ▸ Sink OutOnChunks at rest sink into the surface under them at the end of the burst’s life.
Motion ▸ Hit Per ChunkOffOff, On Hit fires once per burst, at the first landing. On, it fires once for every chunk.

Gravity here is strong, so a throw goes less far than the number suggests. Thrown straight up at 30 studs per second, a chunk rises about 2.3 studs. At 80 it rises about 16.

In Ring mode, the first number of SpreadAngle is the angle of the throw above the flat: 0 is flat outward, 90 is straight along Direction.

The event at steps 7 and 8 is the same On Hit as in Exercise 12, picked the same way. For Rocks it fires when a chunk first touches a surface.

SymptomCauseAction
The chunks fall through the floorThe floor has CanCollide off.Switch CanCollide on for the floor.
The chunks barely leave the groundLaunch Speed is still 30.Repeat step 3.
The chunks vanish without sinkingSink Out is off.Switch it on, or fade them with a Transparency graph.
No sparks at allThe chunks did not touch anything, or the On Hit block has no emitter picked.Repeat step 8.
The chunks lie about but no rubble remains afterwardsSink Out removes it.Switch Sink Out off and raise Lifetime or Linger.
ChangeResult
Motion ▸ Inherit Floor onEach chunk takes the material and colour of the part it lands on, so the rubble matches the floor.
Transform a MeshPart rock in place of the blockEvery chunk is that mesh, at a size of its own.
Motion ▸ Gravity 60A slow, floating throw.
Emission ▸ Timescale -1The burst plays backwards. The chunks start at rest and fly back together.
Motion ▸ Tumble 0The chunks fly without spinning.
Burst Mode Directional, Direction Front, SpreadAngle 15Debris sprayed one way, as from a wall struck from behind.
New in this exerciseTransform as Rocks. Burst Mode. Launch Speed. Hit Per Chunk.
Done beforeTransform as (Exercises 11 and 12). SpreadAngle (Exercises 2, 4, 9 and 10). The On Hit event and its picker (Exercise 12). The Emit button (seven times).
Carried forwardNothing.