So I am wanting the sound to play one time but everytime my knife hits the "glass" the sound plays. Debounce is not working..
local GlassFolder = script.Parent.FallingGlass
local Touched = false
function BreakGlass()
script.Parent.Transparency = 1
script.Parent.Break:Play()
for i,v in pairs(GlassFolder:GetChildren()) do
v.Transparency = .6
v.Anchored = false
end
end
script.Parent.Touched:connect(function(hit)
if hit.Parent.Name == 'Knife' or hit.Name == 'Bullet' and Touched == false then
Touched = true
BreakGlass()
wait(1000000)
Touched = false
end
end)
