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

I cant get the PlaybackLoudness of a Sound?

I am trying to print the PlaybackLoudness of a sound but it keeps outputing "sound loudness is: 0"

while true do
sound = workspace.musix.PlaybackLoudness
stringlet = tostring(sound)
print("sound loudness is: "..stringlet)
wait(1) end

I have tried using tostring but nothing changes really... Can anyone help?

4 comments

0

PlaybackLoudness is a read-only value that only changes when you play the sound, so you should play the sound before checking its loudness. It's not the max volume of the sound by the way.

0

@Afterl1ght, it is playing, still nothing.

0

also that is why the while true do, to constrantly update the variable value

0

Try accessing the PlaybackLoudness from the client with a LocalScript and see the results.

2 answers

Instantiate the Sound object on the client. PlaybackLoudness does not replicate.

3 comments

0

wut?

0

how do i do that sir

0

Create the sound using a LocalScript.

Try updating the sound loudness faster by using:

while game:GetService("RunService").Heartbeat:wait() do

local sound = workspace.musix.PlaybackLoudness

local stringlet = sound

print("sound loudness is: ".. stringlet)

end

And dont play the sound in a localscript and get the loudness in a server script.

1 comment

0

Still returning value 0 :/ "sound loudness is: 0"

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