Sound.RollOffMode is kinda iffy

I tested out Sound.RollOffMode and its audio volume difference isn’t noticeable with increasing/decreasing distance. How do i make it so that the different in volume is noticeable with increasing/decreasing distance, preferably in a linear way

btw I tried Linear mode and the difference still isnt noticeable

You have to set the RollOffMinDistance and RollOffMaxDistance to the number of studs away from the Part or Attachement the Sound is in.
If you have the sound anywhere else it’s considered a Global sound and will be heard everywhere in the game.

For the RollOffMode I prefer InverseTapered.
Inverse just cuts off abruptly.
Linear isn’t very realistic to me.

In real life sound decreases according to the inverse squared formula.
When you double the distance from the source the intensity of sound decreases by 4 (2 squared) times. If you triple the distance, sound intensity decreases by 9 times (3 squared).

yeah it should be parented to the part

anyway here’s my code

local function PlaySound(playedSound, config, weapon)
		playedSound.RollOffMaxDistance = config:GetAttribute("SoundRange")
		playedSound.RollOffMode = Enum.RollOffMode.InverseTapered

		if config:GetAttribute("SoundRange") * 0.2 < 10 then
			playedSound.RollOffMinDistance = 10
		else
			playedSound.RollOffMinDistance = config:GetAttribute("SoundRange") * 0.2
		end

		local playerRootPart = weapon.Parent.HumanoidRootPart
		playedSound.Parent = playerRootPart

		-- Playing the sound and animation and then destroying it
		for _, otherPlr in Teams.Playing:GetPlayers() do
			local distanceToPlayer = (otherPlr.Character.HumanoidRootPart.Position - playerRootPart.Position).Magnitude

			-- Sound is played on client if it's within range
			if distanceToPlayer < config:GetAttribute("SoundRange") then
				PlayEffect:FireClient(otherPlr, "Sound", playedSound)
			end
		end
	end

Why script it?
Just go into the Properties of the Sound in the Explorer window and set them how you want it there.

I never worry about just playing the sound if a player is within range. Just set the sound settings the way you want and it’ll do that automatically.

multiple items go through the same sound system, and sometimes it glitches where you could hear the sound past the max range

and the difference in sound isnt too noticeable for 80% of the distance, but suddenly drops past that

OH YEAH I FORGOT, the sound is initially placed in the configuration of a weapon, and then parented and copied to the player as the script runs

Like I said, that’s what Inverse does, and it’s why I use InverseTapered.