Sorry if the title doesn't make sense, but how do I change it so that when the player touches a brick it plays sound without others interrupting? Like when guy A touches a brick that has this script, it plays a sound, but when guy B touches another brick that also has this script with a different sound, the sound for guy A changes too to that sound. How can I fix that? Sorry if this sounds like a piece of cake.
guy A's touched brick:
local debounce = false
script.Parent.Touched:Connect(function()
if not debounce then
debounce = true
workspace.SoundA:Play()
end
end)
guy B's touched brick:
local debounce = false
script.Parent.Touched:Connect(function()
if not debounce then
debounce = true
workspace.SoundA:Stop()
workspace.SoundB: Play()
end
end)
I want it so that the player only gets to hear the sound when they only touch the bricks themselves.

1 comment
l o c a l s c r i p t