Is there any way I could change the blur intensity with music. For example, the blur increases with the beat of a song. Exactly like this roblox game: https://www.roblox.com/games/2117000638/rockefeller-street
Attempting to Trigger Blur effect with Music?
1 answer
PlaybackLoudness is a Property of Sound Instances, which can range from 0 to 1000
Size is a Property of the "Blur" used in Roblox Lighting with ranges from 0 to 56
Since PlaybackLoudness uses the audio sound volume input, you need to use a LocalScript, since playing the sound on the Server would result in only getting the number 0 (no microphone)
LocalScript
local blur = game:GetService("Lighting"):WaitForChild("Blur")
local sound = script:WaitForChild("Sound")
sound.Looped = true
sound:Play()
while true do
blur.Size = (sound.PlaybackLoudness / 1000) * 56
wait()
end
The math is simply taking the percent of PlaybackLoudness and multiplying by the max limit of the blur size.
In this case, I added a LocalScript under StarterGui with the Sound under the script
6 comments
Thank you!
why
o.o ^
Remember to use wait wisely. ;) https://blog.roblox.com/2012/05/using-wait-wisely/
this didnt even work but ok sissss
In order for this to work, you need to have a blur in lighting
This discussion is preserved as it was. New answers, comments, and votes are closed.

7 comments
I think in the example game they have made the blur effect manually
So i couldn't do it with the Roblox Blur?
If they do this manually it means that they made sure to make the game repeat on a loop where the effect occurs based on the time position of the audio
So I would have to create my own blur?
Sounds have a PlaybackLoudness property that ranges between 0 and 1000 depending on the volume of the sound the instance the property was read. You can use this in conjunction with a loop so you can read the property then setting the blur based on it.
It doesn't return; it's not a function
Fixed