How to make `Sound.LoopRegion` work?

I’m starting to test sounds now.
I have inserted this sound into a part:

I want it to loop only a portion of the sound, for example, from second 1 to second 2.
I wrote this code:

local s = workspace.SpawnLocation:WaitForChild("Conveyor Belt 1 (SFX)")
s.Looped = true
s.PlaybackRegionsEnabled = true
s.PlaybackRegion = NumberRange.new(1, 2)
s.LoopRegion= NumberRange.new(1, 2)
s:Play()

But when playing the project, Studio plays the full sound (0 to 10 seconds) and not from second 1 to second 2 only.

What’s wrong?

Here is the current project if anyone can test:
Baseplate.rbxl (35.6 KB)

1 Like

Is this feature even enabled yet? Trying to set it within Studio also doesn’t work (i.e. setting the PlaybackRegion/LoopRegion properties in Studio just gets overridden to the default values).

Good question.
In Studio these properties don’t even exist in the interface.
Only via script.
But why wouldn’t these properties still be enabled, once they’re documented?
https://create.roblox.com/docs/reference/engine/classes/Sound#LoopRegion