OK so I'm making a door that's locked and it plays a sound when you touch it, but when you touch it once it plays the sound multiple times.
Music = script.Sound script.Parent.Touched:connect(function(hit) Music:Play() wait(5.5) Music:Stop() end)
You'd use what is called a "debounce"
Music = script.Sound local debounce = false script.Parent.Touched:connect(function(hit) if debounce == false then --if debounce is false debounce = true --Sets it to true Music:Play() wait(5.5) debounce = false --turns it back to false Music:Stop() end end)