Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How To Use Bloom with playbackloudness?

On roblox i am currently developing a game and with one of the cut scenes i want to use playbackloudness with bloom, i tried my best but since i am new with Playbackloudness i dont know how to do it. so here is what i got

local sound = game.StarterGui.Audio

game.Lighting.CBloom.Intensity = 0.4,sound.PlaybackLoudness/100,0.9

i still dont know why this dosent work i want the intenstity to follow with the audio beat. so please help if you can

1 answer

Because of a current bug, PlaybackLoudness can not be obtained by Scripts, and will always return 0. You're forced to use LocalScripts.

What you could do is put the BloomEffect inside the players current camera, and then change that acording to the sound.

How to do that:

Localscript inside Player

-- Creates bloom effect client sided.
local bloom = Instance.new("BloomEffect",game.Workspace.CurrentCamera) 

-- Get sound
local audio = game.StarterGui.Audio -- Why would you put that in StarterGui? Roblox has a SoundService for a reason ;D

sound.Changed:Connect(function() -- Fired when a property of sound changes.
	bloom.Intensity = sound.PlaybackLoudness / 1000 
	--[[ 
		Playback loudness returns a value from 0 to 1000. Suggest to not put
		 it on 100 as a normal volume audio will generaly play at 300 - 400.
	]]
end)

4 comments

0

It's not a bug. Servers don't play sounds. The idea that servers should have playback information is stupid on too many levels.

0

I sent roblox an email and they said they'd fix it ;p

0

This dosent work the intensity stuck on 0 forever even if i try to change it while playing.

0

Are you playing the audio in game.StarterGui or in the LocalPlayer.PlayerGui ?

This discussion is preserved as it was. New answers, comments, and votes are closed.