How can I make the sound part of this script work? Also is that debounce right?
Spawner = script.Parent.Parent.SpawnLocation
Flag = script.Parent.Parent.Flag
function onTouch(hit)
script.Parent.Capturesound:Play() -- this is where I need help
script.Parent.Capturesound.Volume = 1 -- is 1 the highest volume it can go?
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if user ~= nil then
Spawner.Neutral = false
Spawner.BrickColor = user.TeamColor
Spawner.TeamColor = user.TeamColor
script.Disabled = true
debounce(5) --is this debounce right?
script.Disabled = false
end
end
script.Parent.Touched:connect(onTouch)
