Sounds playing loudly for all clients

--> on client
bytenet.sound.send({sound = tool.click}) 

--> on server
function sound(data)
	local parent = data.parent
	local sound = data.sound
	if parent then
		local clone = sound:Clone()
		clone.Parent = parent ; clone:Destroy() --> playonremove is enabled for all sound instances
	else
		sound:Play() --> this will always play across the map, loudly, for all players
	end
end

tool.click, for example, has these sound properties:
rolloffmaxdistance = 400
rolloffmindistance = 5
rolloffmode = inverse
volume = 0.3

this issue occurs for all of my sound instances
note: all instances that arent directly parented to a tool are stored in replicatedstorage

1 Like

Copied from my discord reply in the OSS community server

Due to roblox being somewhat special in the head, they decided to make sounds act like they’re within soundservice or workspace (as a global sound) within replicated storage.

Been this way for a long time, was even used as a method to play global sounds for a while in script builder games.

Just ensure you stop playback of your sounds when parenting to replicatedstorage.

3 Likes

this did not resolve the issue whoops

1 Like

Again copied from the thread for this OSS community server question

local array = replicated_sounds[sound]:GetChildren()
        local clone = array[math.random(1, #array)]:Clone()
        clone.Parent = player.Character ; clone:Destroy()

I don’t know if parenting a default sound instance to models will respect any form of volumetric soundstage

Should i try a base part
Like .head

can you try parenting it to the Root part of the character
just use .PrimaryPart of character

Yeah

far simpler

One sec
Works thanks

Solution Summary:

Default sounds treat Assemblies (Models) the same as a folder, workspace, or SoundService; thus playing global audio if only parented to a Character.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.