How can I make it so that when someone touches a block it plays a sound that's grouped inside the script.
✓ ANSWER ACCEPTED
Ontouch play a sound?
1 answer
✓ Accepted answer
local debounce = false
game.Workspace.BlockNameHere:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if debounce == false then
debounce = true
script.Sound:Play()
wait(1.5)
debounce = false
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
