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

I cant get the PlaybackLoudness of a Sound?

Asked by 4 years ago

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?

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. Afterl1ght 321 — 4y
0
@Afterl1ght, it is playing, still nothing. Igoralexeymarengobr 365 — 4y
0
also that is why the while true do, to constrantly update the variable value Igoralexeymarengobr 365 — 4y
0
Try accessing the PlaybackLoudness from the client with a LocalScript and see the results. Afterl1ght 321 — 4y

2 answers

Log in to vote
1
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
4 years ago

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

0
wut? Igoralexeymarengobr 365 — 4y
0
how do i do that sir Igoralexeymarengobr 365 — 4y
0
Create the sound using a LocalScript. Goulstem 8144 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

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.

0
Still returning value 0 :/ "sound loudness is: 0" Igoralexeymarengobr 365 — 4y

Answer this question