I wanted to make one of my old visualizer projects work within FE but obviously due to it being made to be specifically local is hard to do so. I attempted to make a remote event for the client to send the server the Playback Loudness, but even with the remote, it kept returning 0. I know the server cant directly read PlaybackLoudness as audios are client based not server based, but It should be possible to send the PlaybackLoudness value to the server on loop with a remote correct? My attempts failed and kept returning 0 and I really am stuck.
Here is the code I have made so far but doesn't work.
--Local V
while wait() do
local loudness = script.Parent.SoundPart.Sound.PlaybackLoudness
print(loudness) -- to make sure it isnt some kind of preload bug
script.Parent.PBL:FireServer(loudness)
end
-- Server V
local PBLEvent = Instance.new("RemoteEvent", script)
PBLEvent.Name = "PBL"
local PBLoudness = 0
function onPBL(PlaybackLoudness)
PBLoudness = PlaybackLoudness
print("Updated value to "..PBLoudness) -- checking if the server updates
end
PBLEvent.OnServerEvent:Connect(onPBL)
I've cut out of course the whole visualizer as it still functioned as intended, the only issue is that Loudness will always return 0.

1 comment
Is there an error?