Roblox Studio · Lesson 27

Sound and Particles: Give Clear Feedback on Success

Combining prompt text, lightweight particles and optional sound effects, the successful collection can be seen and heard, and the screen will not refresh.

10–15 years old 60 minutes ParticleEmitter / Sound Hands-on practice Testing and Saving

Course overview

On first success, short and clear words, light spots and sounds are given.

After the player completes the action, he needs to know whether the game has received it. A fleeting particle, clear text, and optional soft sound effects can make feedback easier to understand.

Feedback should not be louder than gameplay. In this lesson, we only practice sending out 20 particles at a time. We do not allow the particles to erupt indefinitely, nor do we require you to download any unfamiliar audio.

01 · BEFORE

Before starting

Can use ProximityPrompt and busy. Create a new Lesson27 Baseplate.

02 · MAKE

Your work

After pressing the prompt, the success text is displayed and a small cluster of particles is emitted; the sound effects that have permission to be used are optionally played.

03 · CHECK

Complete flag

Successive operations do not have a large volume of effects; text and particles remain normal when no audio resources are available.

Official particle color effect reference, not the completion screen of this lesson
Figure 27-1: Official particle color reference: First let Emit have clear feedback, and then fine-tune the color and quantity; this is not the finished product of the reward table for this lesson.Roblox Creator Documentation · CC BY 4.0 · The original image has not been modified · Description of the permit

Learning route

Prepare first, then do it; after seeing the result, remember to save it.

Every time a small step is completed, it is tested. Say what you expect to see first, and then use Play and Output to check it. Don't rush to write all the code at once.

1

01 · Organize effects in the same Part

Create FeedbackPad and add Prompt, Attachment, ParticleEmitter, and Sound. Place the ParticleEmitter under Attachment to easily determine the particle emission position.

2

02 · Prepare text that does not rely on sound first

Use BillboardGui to display status above the site. Text can help players who don’t turn on the sound to confirm the results, instead of using “did you hear it” as the only acceptance?

3

03 · Emit once, do not leave the effect on all the time

Enabled=false does not prevent the use of Emit(20) to emit particles once. This way you can accurately control the amount of this effect instead of always turning on the Rate spray.

4

04 · Controlling the quantity is more important than the heap effect

Lifetime determines how long particles can live, and Speed determines the speed. With a large number and long lifespan, more particles will exist in the picture at the same time, and the equipment will need to handle more things.

5

05·Try both silent and fast repeat

Turn off the computer or game volume and try again. The text should still explain what happened. Press the prompts again and again to confirm that multiple rounds of effects will not be superimposed during busy periods.

Step by step

01 · Organize effects in the same Part

Create FeedbackPad and add Prompt, Attachment, ParticleEmitter, and Sound. Place the ParticleEmitter under Attachment to easily determine the particle emission position.

Audio only uses resources that you have the right to use, and which experience has access rights.

  1. FeedbackPad: Size=6,1,6, Position=0,0.5,-10, Anchored=true.
  2. Add ProximityPrompt, ActionText=test feedback, MaxActivationDistance=10.
  3. Add Attachment: BurstPoint, Position=0,2,0; put ParticleEmitter: Burst inside.
  4. Burst.Enabled=false, Lifetime=0.5 to 0.8, Speed=4 to 6, SpreadAngle=45,45; Texture can be built-in rbxasset://textures/particles/sparkles_main.dds.
  5. Add Sound in FeedbackPad: SuccessSound, Volume=0.25, and leave SoundId blank first; then add Script: Feedback.
Official screenshot of SoundId attribute input location
Figure 27-2: Screenshot of the official SoundId attribute: Only use the audio you have the right to use; leave it blank when there is no audio available, and you can still complete this lesson.Roblox Creator Documentation · CC BY 4.0 · The original image has not been modified · Description of the permit

Step by step

02 · Prepare text that does not rely on sound first

Use BillboardGui to display status above the site. Text can help players who don’t turn on the sound to confirm the results, instead of using “did you hear it” as the only acceptance?

This lesson is a shared feedback platform: if one person activates it, other nearby players can also see the effect, so use a global busy lock.

  1. Reads the part of the script that creates BillboardGui.
  2. The text first displays "Ready", and after triggering it is changed to "Test successful! ”, and then resume after one second.

Step by step

03 · Emit once, do not leave the effect on all the time

Enabled=false does not prevent the use of Emit(20) to emit particles once. This way you can accurately control the amount of this effect instead of always turning on the Rate spray.

Skip the sound if SoundId is empty. Even if the resource does not have permission, text and particles should be effective feedback, and the mechanism cannot be stuck waiting for the audio to be loaded.

  1. Paste the complete script.
  2. After playing, press the prompt and observe the text and short particles.
  3. Set the SoundId when there is suitable audio, and keep the volume soft.
Workspace > FeedbackPad > Feedback(Script)Luau
local pad = script.Parent
local prompt = pad:WaitForChild("ProximityPrompt")
local burst = pad:WaitForChild("BurstPoint"):WaitForChild("Burst")
local sound = pad:WaitForChild("SuccessSound")
local busy = false
local board = Instance.new("BillboardGui")
board.Size = UDim2.fromOffset(220, 56)
board.StudsOffset = Vector3.new(0, 4, 0)
board.AlwaysOnTop = true
board.Adornee = pad
board.Parent = pad
local label = Instance.new("TextLabel")
label.Size = UDim2.fromScale(1, 1)
label.TextSize = 24
label.Text = "准备好"
label.Parent = board

prompt.Triggered:Connect(function(player)
    if busy then return end
    local character = player.Character
    local root = character and character:FindFirstChild("HumanoidRootPart")
    local hum = character and character:FindFirstChildOfClass("Humanoid")
    if not root or not hum or hum.Health <= 0 then return end
    if (root.Position - pad.Position).Magnitude > 12 then return end
    busy = true
    label.Text = "测试成功!"
    burst:Emit(20)
    if sound.SoundId ~= "" then sound:Play() end
    task.wait(1)
    label.Text = "准备好"
    busy = false
end)

Step by step

04 · Controlling the quantity is more important than the heap effect

Lifetime determines how long particles can live, and Speed determines the speed. With a large number and long lifespan, more particles will exist in the picture at the same time, and the equipment will need to handle more things.

Do not use fast and intense flashes to express ordinary success. Short and soft feedback is more suitable for long-term play, and should be understandable even when the sound is turned off.

  1. Compare Emit(10) and Emit(20) and choose the one that can be seen clearly.
  2. Try starting the volume from 0.25, without using the maximum volume.
  3. Only set the SoundId after confirming that the resource has access.

Step by step

05·Try both silent and fast repeat

Turn off the computer or game volume and try again. The text should still explain what happened. Press the prompts again and again to confirm that multiple rounds of effects will not be superimposed during busy periods.

If the particles are not displayed, first check the Attachment path, Texture and emission position; if only the sound fails, check the resource permissions and Output.

  1. Silent test once.
  2. Press five times quickly to confirm that the feedback does not superimpose infinitely.
  3. Observe whether particles are blocking the road in the smaller field of view of the device simulation.

Homework

It's your turn to change and make your own version.

1 Three feedback methods

Describes what text, particles and voices help players to identify.

2 Lighter effect

Reduce the particles to 10 and confirm the success status is still clear.

3 Chosen: Colouring

The selection of a particle colour that is consistent with the theme of the camp does not require an increase in the number of particles to be visible.

Completion criteria:First verify the work in Playtest, then click Stop and save it as "Initials_Lesson27" or a copy of the corresponding Homework; do not overwrite the runnable version of the previous lesson.

Exit questions

Answer it yourself first, and then expand on it.

Can I still Emit if Enabled=false?

Yes, a specified quantity may still be sent manually after closing the continuous launch.

Will not having a SoundId affect the text?

No, this example will skip the sound, and the text and particles will run independently.

Why can't I just copy the audio ID?

Resources may be restricted by copyright or experience access rights.

What happens if Lifetime is increased?

The particles stay longer, and there may be more particles that need to be displayed at the same time.

Explore further

This is where we start when we need to check the data.

The text code can be copied directly. First confirm the script type, placement, and whether this code is a complete version or a small experiment; do not run multiple versions of the same script superimposed. The source of the interface reference picture has been marked. The object names in the picture may be different from those in this lesson. Please refer to the operation steps.

Download the code and placement instructions for this lesson