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

Why is the PlaybackLoudness not working? [Found Solution]

I have a script in a part that changed the size of the part depending on the PlaybackLoudness of a song. It works PERFECTLY in studio, but when I play the game on roblox nothing happens. I am getting no errors in studio or on the dev console.

origy = script.Parent.Position.Y

while true do
	wait()
	if game.Workspace.Sound.PlaybackLoudness > 1 then
		script.Parent.Size = Vector3.new(2, (game.Workspace.Sound.PlaybackLoudness/46)*4, 2)
		if script.Parent.Size.Y > 22 then
			script.Parent.Size = Vector3.new(2, 22, 2)
		end
		script.Parent.CFrame = CFrame.new(script.Parent.Position.X, (origy + script.Parent.Size.Y/2)-2, script.Parent.Position.Z)
	end
end

1 comment

0

Put it on Local Script and then place it at starter gui

1 answer

For those who are curious on how to do it, lemme just say that the PlaybackLoudness is local. I had to put the sound in something only the palyer has, like the playergui, in order for it to work.

1 comment

0

player*

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