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
Put it on Local Script and then place it at starter gui