My plugin can't play sounds anymore

Setting your studio settings like the picture above would enable sound functionality in studio mode (not solo and not running). This functionality includes triggering :Play() on a sound that is inside a model that is in the Workspace.

I’ve done some tests with the command bar and played the Sound parented to a Model in Workspace, directly in the Workspace and in the CoreGui - none of it played the sound.

The code below would function normally when run in the command bar (with studio settings set like in the picture). It doesn’t anymore, in “studio” mode specifically.

local sound = Instance.new("Sound")
sound.SoundId = "rbxassetid://253841289"
sound.Parent = game.Workspace
sound:Play()

This functionality is crucial for my plugin since it has audio managing.

The plugin does play sounds in “Run” mode, but “Run” does not provide auto-saving functionality and overall has weaker precautions for archiving.

It’s also worth noting that Sound object functionality changed recently for client as well where sounds parented to Player objects only played to the player, but now play globally (local playback container in non-FE games is now PlayerGui). Sure, it could be an “undocumented artifact”, but it just fell on our heads way too silently.


Edit:
Working with the plugin on “Run” mode is a menace since studio has some kind of a saving bug where you can’t overwrite an existing file just by normally saving.

5 Likes

ill take a look at this.
you happen to have a minimal plugin that reproduces this problem?

I can prepare a small plugin as soon as I can if it helps.

1 Like

thanks, that would be really helpful.

also didn’t know about the playergui non-fe local thing. that isn’t expected (though seems like you’re the only major dev really affected by this). ill get to the bottom of this and make it officially documented.

This plugin represents my usecase:
SoundTestPlugin.rbxmx (4.8 KB)
It’s expected to play a sound in studio mode, but it only works when you run the game.

Where I actually use the feature:

I’m literally looking for any way possible for a plugin to play a sound while in studio mode. Nothing that I have tested worked so far.

1 Like

Thanks, I’ll take a look.

Got it, know what the plugin problem is. Should be fixed for a release soon (don’t want to guarantee next week).
I’ll post again when it’s up.

Can I suggest that you use the studio preview in the meantime?

1 Like

Some followup:

Right now, sounds only play when the RunService is “running” (in this manner, it’s similar to physics or other simulations).

I’ll be adding a “play detached” sound method (which takes soundid, is3D, 3D Position, timeposition start) to Soundservice. You’ll need to use this to get a Sound to play when the game isn’t running. Annoucement coming when it’ll be out.

Will we be able to use this when RunService is running as well?

Yes

1 Like

Update: this is coming next thursday.

3 Likes

Update, the method is

game:GetService(“SoundService”):PlayLocalSound(your sound object here)

And it’s getting enabled today.

9 Likes

its live

1 Like

Implemented update to plugin. Works perfectly.

Kudos.

1 Like

Don’t mean to necro post but the issue is still prevailing,
I have followed the settings on the main post but the nothing happens
Basically, if you press play and run the playlocalsound() code in a local script or plugin, it works!
But on the server side/not running part of studio, it doeznt work! the code definetely runs but no output sound!
game:GetService("SoundService"):PlayLocalSound(Z)
Anything you can do to help? I have searched the devforum and other placez for an answer but nothing!

iz there another way to make the plugn play sounds?

maybe you programmed this to have somewhat of a “Juke Box” type function, with ID’s as a core functionality.

this has happened to pretty much all games now, so maybe try to re-program your code in the plugin.

1 Like