Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Ontouch play a sound?

How can I make it so that when someone touches a block it plays a sound that's grouped inside the script.

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.