RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make a StarterCharacterScript where an audio muffles depending on the cameras region"
server script -- local StarterCharacterScript = script.Parent local Audio = StarterCharacterScript.Audio local function onCameraChanged(camera) local region = camera.RegionOfInterest local scale = region.Size.X * region.Size.Y Audio.Volume = math.clamp(1 - (scale / 100), 0, 1) end game.Workspace.CurrentCamera.Changed:Connect(onCameraChanged) onCameraChanged(game.Workspace.CurrentCamera)