How does RollOff work on sounds?

I’m trying to add RollOffMinDistance and RollOffMaxDistance to sounds so you can only hear them from a certain distance, but it’s not working? I don’t really know how they work, can someone explain it please?

3 Likes

I think the reason it’s not working for you is because your sound isn’t placed inside of a part rather it’s inside of a model.

21 Likes

The value for those properties is the distance in studs from the player.
Min being the minimum which you can set to 0 and Max being how far away you want it to be heard.

Here is an API Reference page on RollOffMode:
https://developer.roblox.com/en-us/api-reference/property/Sound/RollOffMode

2 Likes

I haven’t touched audios in a while so I might be wrong, but from what I understood;

It only works if the audio is parented to a certain part/location. Try it.

1 Like

Oh i thought it would work inside a model like how you can put a clickdetector inside a model and it’ll work, I’ll try this, thank you!

2 Likes

Putting it inside a model doesn’t work cause models don’t hold a position/real part. Put it inside a physical instance.

2 Likes

No problem, rookie mistake. Hopefully this fixes your issue.

1 Like