Where to parent sound to play locally

Hello, this might be a simple question, but I don’t know where I could Parent a sound so that it plays locally for one player. Would this be in the Players service? I tried putting it in PlayerGui, but the problem is that the music stops playing if the player resets his character.
Thanks for any help!

1 Like

If you put it in a ScreenGui, uncheck the “ResetOnSpawn” property of it, so it doesn’t stop playing when they respawn.

2 Likes

It’s probably worth mentioning that it’s highly advisable to ensure that SoundService.RespectFilteringEnabled is set to true - this make it so any sounds from the client does not replicate across to the server. This means that the location could be anywhere - so long as said location has the ability to play sounds in the first place.

1 Like

Isn’t this enabled by default? I didn’t change any settings of the sound service. And I want to play the sound from a server script to the client. Is this possible?

This seems to work although I don’t think it’s the best solution for the problem? What I’m doing is from a server script choosing songs from a folder in serverstorage and then cloning the chosen song to the players that are already in the game, and for players that join I also clone it to them (currently in PlayerGui under a ScreenGui).
If you’re wondering why I am doing this and not just playing it in the workspace: I want to change the sound volume individually for each player.
Thanks for your replies!

Anywhere that is active (workspace, ScreenGui, active script) will play a sound on client, as long as it is played locally via LocalScript. There are no more or no less rules, it’s as simple as that.

So I should use a remote event then?