-
What do you want to achieve? A confetti canyon that emits, or fires when a given sound hits a certain bass, or volume.
-
What is the issue? Can’t really find any idea on how to start with this.
-
What solutions have you tried so far? Looking into Sound Api I would think of Volume
, PlaybackLoudness, and Pitch.
Any idea how I could go about, or create a confetti canyon that does fire when a sound hits a certain loudness or pitch? Any help is appreciated!
2 Likes
After doing a little bit of looking, I believe what you’ll want to use is PlaybackLoudness.
There is a good article I found on it here, which explains it pretty well.
4 Likes
local Particle1 = game.Workspace.FIRSTCANNON.Source1.Confetti
local Particle2 = game.Workspace.FIRSTCANNON.Source1.Smoke
local Sound = game.Workspace:WaitForChild("Sound")
local maxLoudness = 30
while true do
local amplitude = math.clamp(Sound.PlaybackLoudness / maxLoudness, 0, 1)
if amplitude <= 10 then
Particle1.Enabled = true
Particle2.Enabled = true
else
Particle1.Enabled = false
Particle2.Enabled = false
end
end
Do you know why I could be getting a script exhaustion time error?
I know its a while true do script but…
2 Likes
just do a wait() before the end in while true do
2 Likes
You forgot to add “wait()” after while true
2 Likes