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

0

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.

0

ohhh! ok thanks

0

now it just repeats when i touch it again...

0

don’t need a debounce just use .IsPlaying

0

how tho?

0

in localscript all changes happen only for that person, if you want that everyone hears it then u should make it a script

0

and he means instead of a debounce u put if not workspace.SoundA.IsPlaying then ...

0

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

0

now it works, thank you