I have tried doing a script but I haven't been successful any of the times I tried. l
local Client = { ScreenShakeSettings = { CameraMinFOV = 72, CameraMaxFOV = 70, CameraMaxVolume = 1000 } } local Settings = Client.ScreenShakeSettings local SoundObject = workspace.GLOBAL_SOUND local CurrentLoudness = SoundObject.PlaybackLoudness local FOV = Settings.CameraMinFOV + (Settings.CameraMaxFOV - Settings.CameraMinFOV) * (CurrentLoudness / Settings.CameraMaxVolume) if FOV > 0 and FOV < 120 then workspace.CurrentCamera.FieldOfView = FOV end
So, there's two soups: The scripting-friendly one, and the audio-software friendly one.
I recommend the first unless you're up for a slight challenge, so I'll detail it below: Use PlaybackLoudness.
PlaybackLoudness tells you how "loud" a sound is being at a given timeframe, and it's a number between 0 and 1000, inclusive.
As to making the "screen bounce", you'd have to elaborate more on that!
I'd personally try to CFrame the camera by an offset determined by
math.random()*Loudness*Multiplier
-on both X and Y axis each RenderStep, preferably with a multiplier <1, but that's just me.
Try and experiment, that's all I can tell you without further info on what you're trying.
local Client = { ScreenShakeSettings = { CameraMinFOV = 72, CameraMaxFOV = 70, CameraMaxVolume = 1000 } } local Settings = Client.ScreenShakeSettings local SoundObject = workspace.GLOBAL_SOUND local CurrentLoudness = SoundObject.PlaybackLoudness local FOV = Settings.CameraMinFOV + (Settings.CameraMaxFOV - Settings.CameraMinFOV) * (CurrentLoudness / Settings.CameraMaxVolume) if FOV > 0 and FOV < 120 then workspace.CurrentCamera.FieldOfView = FOV end
This is the script I have.