I usually make my scripts with how I'm setting up the debounce now, however, it's not working.
local p = script.Parent
function t(h)
local hu = h.Parent:FindFirstChild("Humanoid")
local db = true
if hu then
db = false
p.Color = Color3.new(255,0,0)
p.Sound:Play()
wait(3)
local b = Instance.new("Explosion")
b.Parent = game.Workspace
b.Position = p.Position
p:Destroy()
db = true
end
end
p.Touched:connect(t)
The sound keep replaying, and I'm not sure why. Any ideas as to why this is happening?
