This is the screen shake to audio local script:
local RunService = game:GetService("RunService")
local Music = workspace:WaitForChild("Music")
local CurrentCamera = workspace.CurrentCamera
local ScreenShakeSettings = {
CameraMinFOV = 75,
CameraMaxFOV = 100,
CameraMaxVolume = 1200
}
game:GetService("RunService").RenderStepped:connect(function()
local CurrentLoudness = Music.PlaybackLoudness
local FOV = ScreenShakeSettings.CameraMinFOV + (ScreenShakeSettings.CameraMaxFOV - ScreenShakeSettings.CameraMinFOV) * (CurrentLoudness / ScreenShakeSettings.CameraMaxVolume)
if FOV > 0 and FOV < 130 then
CurrentCamera.FieldOfView = FOV
end
end)
I basically want to make this work for more than one sound like the other sounds I have (Music2, Music3, Music4, etc). The one that is attached to the script right now is "Music". The local script is called Main and it goes in starter GUI.
