Rocks
A Rocks emitter throws bursts of debris. Each chunk is a duplicate of the Part, at a size of its own. The chunks fly out, fall, bounce, slide to rest flat on one face, and can sink into the ground before they vanish.
Exercise 13 makes a Rocks emitter for the first time.
What it makes possible:
- A ground slam. Burst Mode
Ring, DirectionTop, SpreadAngle30, Launch Speed50, 80, Sink Out on. Rubble flies out in a ring, settles, and sinks away. - Dust under every chunk. On Hit with a dust emitter in its Emit row, Mode
AtPosition, Hit Per Chunk on. - Rubble that matches the floor. Inherit Floor on. Each chunk takes the material and colour of the part it lands on.
- An object that comes back together. Timescale
-1. The chunks start at rest and fly back to where they were thrown from. - Shards that float away. A negative Gravity such as
-20, Sink Out off, a Transparency graph from 0 to 1. - A trail on every chunk. A stock Trail with a Duration above 0, inside the Rocks
RenderTemplate.
At a glance
Section titled “At a glance”| Made from | A Part or a MeshPart, with Transform as Rocks |
| One particle is | One burst of chunks |
| Emit count starts at | 1 |
| Modes | Emit and Animate |
| Sections | Emission, Appearance, Spawn, Motion, Events, Advanced |
| Not present | Link, and a Rotation row. Each chunk starts turned at random. |
An Emit count of 2 means two bursts, not two chunks. The number of chunks is its own row. A burst counts as one particle toward the particle counter and the Particle Cap, however many chunks it has.
A burst is a temporary group of parts. The chunks are not solid. Characters walk through them, and they push nothing.
Events and Advanced start collapsed.
Where a burst starts
Section titled “Where a burst starts”A burst reads the place of the emitter Part once, at the moment it is fired. The chunks then fly through the world by themselves. Moving the emitter afterwards does not move a burst already in the air.
| Case | The burst is thrown from |
|---|---|
| The emitter stands by itself | The emitter Part, where it is when the burst is fired. |
| The emitter is nested in another emitter | The parent particle, where it is at that moment. |
| The emitter is fired by another emitter’s event | The spot of the event. |
Transform as Rocks
Section titled “Transform as Rocks”Select a Part. Press ▾ beside Transform, then Transform as Rocks.
Any Part or MeshPart that is not yet an emitter can be used. It may hold a SpecialMesh, Decals, Textures or a SurfaceAppearance.
| Thing | After the transform |
|---|---|
| The Part | It turns fully transparent. It marks where bursts are thrown from. |
RenderTemplate | A hidden copy of the Part. Every chunk is a duplicate of it. |
| A SpecialMesh, Decal, Texture or SurfaceAppearance in the Part | It is kept in the RenderTemplate, so every chunk shows it. |
| A SpecialMesh, Decal or Texture on the Part itself | It is removed from the Part. |
| An Attachment or an emitter already transformed, inside the Part | It is kept in the RenderTemplate. |
| Any other child of the Part | It is not kept in the RenderTemplate. |
| Color and Transparency rows | They take the Part’s colour and transparency. |
| Material | It stays on the RenderTemplate. The Material row edits it. |
| HUD ▸ Emit box | It reads 1. |
Because the Emit count starts at 1, the Emit button throws one burst straight after the transform.
The Explorer shows three things inside the emitter: PartIcleProperties, RenderTemplate and EmitParent. EmitParent holds the Emit Into row.
Where the chunk look comes from
Section titled “Where the chunk look comes from”The look of a chunk comes from the RenderTemplate, which is the Part that was transformed.
| The Part was | Every chunk is |
|---|---|
| A block | A block. |
| A MeshPart rock | That mesh. |
| A Part with a SpecialMesh, Decals, Textures or a SurfaceAppearance | The same, with all of them kept. |
- The plugin includes no rock mesh of its own.
- The size of a chunk is the Size of the
RenderTemplate, times the chunk’s Chunk Scale. The Part’s Size is not kept as a row. - To change the look later, edit the
RenderTemplatein Studio, or use the Appearance rows. - With Inherit Floor on, a chunk takes its material and colour from the part it lands on.
Emission
Section titled “Emission”| Row | Kind | Starts at | Unit | What it does |
|---|---|---|---|---|
| Mode | List | Emit | Emit throws a new burst at every emit. Animate plays one burst at a time. | |
| Loop | Switch | Off | Animate mode only. Repeats the cycle until switched off. | |
| Enabled | Switch | Off | Emit mode only. Throws bursts at the Rate until switched off. | |
| Rate | Number | 2 | Bursts per second | How many bursts are thrown each second while Enabled is on, or during a Duration. Hidden in Animate mode. |
| Lifetime | Two numbers | 3 | Seconds | How long one burst lasts. All its chunks share the one Lifetime. |
| Linger | Number | 0 | Seconds | After its Lifetime the whole burst stays frozen in its last frame for this long. |
| Timescale | Graph | 1 | The speed of the burst’s own clock. |
The Emit, Delay and Duration boxes on the HUD fire a Rocks emitter as they fire any other. After the Delay, the Emit count of bursts is thrown at once. Each burst picks its own number of chunks. With a Duration above 0, the emitter then runs at its Rate for that long. The rows are described in full on Emission and the HUD.
Emit mode and Animate mode
Section titled “Emit mode and Animate mode”| Emit mode | Animate mode | |
|---|---|---|
| What exists | A new burst at every emit. Several can be alive at once. | One burst for the emitter. |
| Fired again while a burst is alive | Another burst is added. | The press is ignored until the burst ends. |
| End of a cycle without Loop | The burst is removed after its Linger. | The burst holds its last frame for the Linger, then is removed. |
| Loop on | Not used. | Each cycle throws a new burst from the place the emitter has at that moment. |
| Emit count | Used. | Not used. |
| Pool | Used if on. | Not used. |
With Loop on, every cycle is a new burst. The chunks are picked afresh, and their paths are worked out again. An edit made while a loop runs shows at the start of the next cycle.
Timescale and exact rewind
Section titled “Timescale and exact rewind”| Timescale | What you see |
|---|---|
Above or below 1 | The whole flight plays faster or slower. |
0 | The chunks hang in the air. |
Below 0 | The flight plays exactly backwards. The chunks fly back to the point they were thrown from. |
A burst rewinds exactly: it is the same flight, played backwards. Timescale -1 starts the chunks at rest and flies them back together.
Sink Out follows the same clock. Timescale 0 pauses the sinking. A Timescale below 0 raises sunken chunks back out of the ground.
Appearance
Section titled “Appearance”| Row | Kind | Starts at | Unit | What it does |
|---|---|---|---|---|
| Material | List | The Part’s material | The material of every chunk. A change shows from the next burst. | |
| Color | Colour | The Part’s colour | The colour of all the chunks over the burst’s life. | |
| Brightness | Graph | 1 | Multiplies the colour, over the burst’s life. It is not a light. | |
| Transparency | Graph | The Part’s transparency | 0 to 1 | Fades all the chunks over the burst’s life. |
| Scale | Graph | 1 | Multiplies the size of every chunk over the burst’s life. |
Material writes straight to the RenderTemplate. The row shows the material the RenderTemplate has now.
Color also tints a Decal or a Texture on the chunks, and Transparency fades it.
Brightness multiplies each part of the colour, and no part can go above full. On a white chunk a value above 1 changes nothing. A value below 1 darkens the chunk.
Scale acts on top of each chunk’s own Chunk Scale. The graph cannot go below 0, and a value below 0.01 counts as 0.01.
| Row | Kind | Starts at | Unit | What it does |
|---|---|---|---|---|
| Burst Mode | List | Directional | The pattern of the throw: Directional or Ring. | |
| Chunks | Two numbers | 6, 10 | Count | How many chunks are in a burst. Each burst picks a whole number between the two. |
| Chunk Scale | Two numbers | 0.5, 1.5 | Multiple of the RenderTemplate Size | The size of each chunk. Each chunk picks one value and is scaled evenly by it. |
| Pos. Mode | List | Local | The axes the Position offset is measured along: the emitter’s, or the world’s with Global. | |
| Position | Two numbers for each of X, Y, Z | 0 | Studs | Where each chunk starts, measured from the place the burst is thrown from. Each chunk picks its own offset. |
The Position row and its Even dots are described on Spawn. A Rocks emitter has no Rotation row and no Cycle rows.
Burst Mode
Section titled “Burst Mode”| Burst Mode | Result |
|---|---|
Directional | Every chunk goes along Motion ▸ Direction. Each is tilted at random within the SpreadAngle. |
Ring | The chunks are spaced evenly around the Direction axis and fly outward. The first number of SpreadAngle tilts them toward Direction. |
With Direction Top:
| Burst Mode | SpreadAngle | Result |
|---|---|---|
Directional | 25, 25 | A cone of chunks thrown upward. The rows start this way. |
Ring | 0 | A ring thrown flat outward. |
Ring | 25 | A ring thrown outward and 25 degrees upward, as from a ground slam. |
Ring | 90 | Every chunk thrown straight along Direction. |
In Ring mode the second number of SpreadAngle is not used.
Chunks and Chunk Scale
Section titled “Chunks and Chunk Scale”- Chunks is at least 1 and at most 32.
- A burst is built for the larger number of the Chunks row. A wide range costs as much as its larger number.
- Chunk Scale
0.5, 1.5on aRenderTemplateof 2 by 2 by 2 studs gives chunks between 1 and 3 studs across.
The Even dot on Position
Section titled “The Even dot on Position”With an Even dot on, the chunks of a burst are spaced in equal steps across the range. The spacing is centred, and the two ends of the range are not used.
Position X -4, 4 with its Even dot on and 4 chunks puts the chunks at -3, -1, 1 and 3 studs.
A Part emitter spaces an Even axis differently.
Motion
Section titled “Motion”| Row | Kind | Starts at | Unit | What it does |
|---|---|---|---|---|
| Direction | List | Top | The axis of the throw, as a face of the emitter: Top, Bottom, Front, Back, Left or Right. | |
| SpreadAngle | Two numbers, x, y | 25, 25 | Degrees | In Directional, the random tilt of each chunk. In Ring, x is the angle of the throw above the flat. |
| Launch Speed | Graph | 30 | Studs per second | How hard each chunk is thrown. |
| Gravity | Two numbers | 196.2 | Studs per second per second | The downward pull. Each chunk picks its own value. |
| Bounciness | Two numbers | 0.3, 0.5 | 0 to 1 | The share of its speed a chunk keeps when it bounces. At 0 it does not bounce. |
| Friction | Two numbers | 0.3 | 0 to 1 | How much sideways speed is lost at each bounce, and how quickly a chunk slides to a stop. |
| Tumble | Two numbers | 90, 360 | Degrees per second | The spin of a chunk in flight, around a random axis and in a random direction. |
| Sink Out | Switch | On | Chunks at rest sink into the ground at the end of the burst’s life. | |
| Inherit Floor | Switch | Off | A chunk takes the Material and Color of the part it first lands on. | |
| Hit Per Chunk | Switch | Off | Off, On Hit fires once for the burst. On, it fires once for every chunk. |
Gravity, Bounciness, Friction and Tumble are picked for each chunk. Every chunk of a burst gets a value of its own.
The hint in the empty SpreadAngle box reads x, y (Ring: x = elevation).
Launch Speed and Gravity
Section titled “Launch Speed and Gravity”Gravity starts at 196.2, which is Roblox’s own gravity. It is strong, so a throw goes less far than the number suggests. Thrown straight up, a chunk rises by its speed squared, divided by twice the Gravity.
| Launch Speed | Gravity | Rise, thrown straight up | Time until it is back at the height of the throw |
|---|---|---|---|
| 30 | 196.2 | About 2.3 studs | About 0.3 seconds |
| 50 | 196.2 | About 6.4 studs | About 0.5 seconds |
| 80 | 196.2 | About 16 studs | About 0.8 seconds |
| 30 | 60 | 7.5 studs | 1 second |
With the starting values, a burst is a small hop.
In Ring mode only part of the speed goes upward. At SpreadAngle 30 a chunk thrown at 50 studs per second rises about 1.6 studs. At 80 it rises about 4 studs.
- Gravity always pulls along the world’s down. It does not follow the rotation of the emitter.
- A negative Gravity makes chunks fall upward.
- Bounciness and Friction are held between 0 and 1.
Flight, landing and rest
Section titled “Flight, landing and rest”Each chunk goes through these stages:
- It flies an arc under Gravity, tumbling.
- When the arc meets a surface, the chunk bounces if it still moves fast enough after Bounciness is applied. Friction takes away some of its sideways speed. Its spin changes to a roll in the direction of travel.
- When it no longer bounces, it slides a short way along the surface and slows. More Friction stops it sooner. As it slides it turns to lie flat on one of its faces, and it prefers a broad face.
- It rests exactly on the surface. It does not move again until the burst ends.
A chunk that finds no ground keeps falling until the Lifetime ends.
What a chunk collides with
Section titled “What a chunk collides with”| A chunk lands on | A chunk passes through |
|---|---|
| A part with CanCollide on | A part with CanCollide off |
| Terrain | Water |
The emitter Part, its RenderTemplate, and the plugin’s own particles | |
| The Emit Into instance and everything inside it | |
| Whatever the Hit Filter leaves out | |
| Other chunks, and characters |
- Chunks do not collide with one another. They can overlap where they land.
- The level is read once, when the burst is fired. A door, a platform or a character that moves afterwards is not noticed.
- A chunk keeps the path and the resting place it was given. If the thing under it moves away, the chunk stays hanging there.
Sink Out
Section titled “Sink Out”With Sink Out on, chunks at rest sink during the last part of the burst’s life.
- Each chunk moves into the surface it rests on. On a slope it sinks into the slope, not straight down.
- The sinking starts slowly and speeds up.
- A chunk sinks deep enough to be fully out of sight.
- A chunk still in flight at that time does not sink.
- With Sink Out on, a Linger shows nothing. The chunks are already under the ground.
With Sink Out off, the chunks stay where they rest and vanish all at once at the end of the Lifetime. Fade them with a Transparency graph for a softer end.
To leave rubble lying, switch Sink Out off and raise Lifetime or Linger.
Inherit Floor
Section titled “Inherit Floor”With Inherit Floor on, each chunk takes the Material and Color of the part it lands on. It does so at its own first landing. A burst thrown onto a brick floor becomes brick rubble.
Events
Section titled “Events”A Rocks emitter has the four event blocks and a Hit Filter row. Events are described in full on Events.
On Hit and Hit Per Chunk
Section titled “On Hit and Hit Per Chunk”For Rocks, On Hit fires when a chunk first touches a surface.
| Hit Per Chunk | On Hit fires |
|---|---|
| Off | Once for the burst, when the first chunk to land makes its first contact. |
| On | Once for each chunk, at that chunk’s own first contact. |
- Later bounces do not fire On Hit.
- A burst whose chunks never touch anything does not fire it.
- A target with Mode
AtPositionappears at the point of contact. - An event script receives the instance that was touched, the position, and the direction the surface faces. See The event script and its payload.
On Emit, On Death and On Destruction
Section titled “On Emit, On Death and On Destruction”With Mode AtPosition, a target fired by one of these three events appears at the place the burst was thrown from. It does not appear at the chunks.
In an event script, payload.SetColor and payload.SetTransparency act on every chunk of the burst.
Hit Filter
Section titled “Hit Filter”The Hit Filter row is at the top of the Events section. It belongs to the emitter, not to On Hit. It limits what the chunks land on, and it applies while On Hit is off.
A Rocks emitter as the target of an event
Section titled “A Rocks emitter as the target of an event”Another emitter’s event can fire a Rocks emitter. Pick it in the event’s Emit row. Its Emit count of 1 means it fires with no more setup.
- The burst is thrown from the spot of the event.
- Mode
AtPositionuses that spot with the Rocks emitter’s own rotation. - Mode
AtCFrameuses that spot, turned the way the event’s particle was turned. - The Position row still applies on top.
Advanced
Section titled “Advanced”| Row | Kind | Starts at | What it does |
|---|---|---|---|
| Anim. Steps | Number | 100 | How many times the appearance graphs are read over one Lifetime. |
| Emit Into | Instance, picked with * | None | Where the chunks of a burst are placed in the Explorer. |
| Preload Texture | Switch | Off | Keeps every texture the emitter uses loaded, so the first burst does not show blank textures. |
| Pool | Switch | On | Reuses finished bursts in place of making new ones. |
Anim. Steps acts on Color, Brightness, Transparency and Scale. The flight of the chunks does not use it. The flight is played every frame. A value of 0 or less counts as 100.
Emit Into does not change where a burst appears.
Nesting
Section titled “Nesting”Nesting is described in full on Nesting.
| What is put where | Result |
|---|---|
A transformed emitter inside the Rocks RenderTemplate | It fires once for each burst, at the place the burst was thrown from. It is not placed on each chunk. |
A stock ParticleEmitter, Trail or Beam inside the RenderTemplate | Every chunk has one of its own, because every chunk is a duplicate of the RenderTemplate. |
A Rocks emitter inside the RenderTemplate of a Part, Attachment or Model emitter | The burst is thrown from the parent particle. |
- The nested emitter’s own Emit, Delay and Duration decide what it does for each burst.
- With Mode
Animateand Loop on, nested emitters fire again at every cycle. - A stock ParticleEmitter in the Part is not carried over by the transform. Put it into the
RenderTemplateafterwards. - A stock Trail or Beam in the
RenderTemplateruns only with a Duration above 0. This is the way to a dust trail on every chunk. See Editing stock ParticleEmitters, Trails and Beams.
With the tools
Section titled “With the tools”| Tool | Effect on a Rocks emitter |
|---|---|
| Size | Multiplies the Launch Speed graph, Position, Chunk Scale and Gravity. |
| Time | Multiplies Rate, Tumble and the Launch Speed graph. Divides Lifetime. Multiplies Gravity by the square of the factor. |
Size multiplies Gravity together with Launch Speed, so the arcs keep their shape at the new size. It does not change Chunks, Bounciness, Friction, Tumble, SpreadAngle, the Scale graph, or the Size of the RenderTemplate.
Time does not change Bounciness, Friction or Linger. It divides the Delay and Duration on the HUD, as for every emitter.
The tools are described on Size and Time.
Motion Preview does not draw a Rocks emitter.
Limits
Section titled “Limits”- A burst has at most 32 chunks.
- Rocks are meant for open ground.
- Chunks do not collide with one another or with characters, and they are not solid.
- The level is read once, when the burst is fired. A chunk does not notice anything that moves afterwards.
- A thin or small obstacle near a chunk’s path can be missed.
- Gravity always acts along the world’s up and down.
- Launch Speed uses only the first value of its graph.
- There is no Link. A burst is thrown from where the emitter is, and does not follow it.
- An edit acts on bursts thrown after it. An Animate loop takes the edit at its next cycle.
- The work for a burst is done when the burst is fired. More chunks and bouncier chunks need more work.
- Once its chunks are at rest, a burst costs almost nothing until it sinks or ends.
- A high Rate with many chunks is the costly combination.