In clubs and such on Roblox, you may have seen that they you playbackloudness to create an effect when theres a beat. However, not all songs have the same playbackloudness. Is there anything to use to fix that?
local blr = Instance.new("BlurEffect", game.Lighting) local TS = game:GetService("TweenService") local inf = TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0,true,0) blr.Size = 0 local sound = workspace:FindFirstChildOfClass("Sound") local p = { Size = 10 } local x = { FieldOfView = 65 } wait(1) local T1 = TS:Create(blr, inf, p) T1:Play() local CamT = TS:Create(workspace.CurrentCamera, inf, x) workspace[tostring(sound)]:Play() while wait() do print(workspace[tostring(sound)].PlaybackLoudness) if workspace[tostring(sound)].PlaybackLoudness > 400 then T1:Play() CamT:Play() end end
Script above works, but not with all songs as some have their beat at 500 playbackloudness and others at 300.