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

Why doesn't playback loudness work?

Asked by
PolacW 0
5 years ago

So i have a script inside of my model called sample and i want it too set the brightness to the loudness of a sound but it doesn't, all it does is set the lighting brightness to 0.

Code:

local light = game.Lighting
local music = script.Parent.Sound
local model = workspace.Sample
while wait() do
    light.Brightness = music.PlaybackLoudness
end

Any help is appreciated.

0
Try dividing PlaybackLoudness by 1000 in conjunction with tonumber. checkerscat2 116 — 5y
0
Thanks. PolacW 0 — 5y
0
if i were you, just dont use local, its only for blocks of code, and maybe its the problem, thats a small code so i would not use local for setting variables CommanderCaubunsia 126 — 5y

Answer this question