So I made this in a local script, when someone touches the brick first it plays fine. But when others touch it they can't hear anything! What should I do? The scripts are in StarterPlayerScripts.
Script:
local debounce = false
game.Workspace.AMusic.Touched:Connect(function()
if not debounce then
debounce = true
workspace.SoundA:Play()
end
end)

10 comments
The problem is that you set debouce = true, and it will stay true. If you want others to hear the script, then put a wait() and a debounce = false.
this, see https://developer.roblox.com/en-us/articles/Debounce
ohhh! ok thanks
now it just repeats when i touch it again...
don’t need a debounce just use .IsPlaying
how tho?
in localscript all changes happen only for that person, if you want that everyone hears it then u should make it a script
and he means instead of a debounce u put if not workspace.SoundA.IsPlaying then ...
oh okay! thanks. also im making a obby game so i only want the person to hear it, also the other people who touches it only hears it themselves
now it works, thank you