Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How To Use Bloom with playbackloudness?

Asked by 7 years ago

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

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago
Edited 7 years ago

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)
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. User#6546 35 — 7y
0
I sent roblox an email and they said they'd fix it ;p RubenKan 3615 — 7y
0
This dosent work the intensity stuck on 0 forever even if i try to change it while playing. danielsury06 18 — 7y
0
Are you playing the audio in game.StarterGui or in the LocalPlayer.PlayerGui ? RubenKan 3615 — 7y
Ad

Answer this question