Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my script stop working when i add a debounce? (Fixed by me)

Asked by 5 years ago
Edited 5 years ago

My script stops working when I add a debounce too it why?

Thanks in advance.

01local Part = workspace:WaitForChild("Breakable_Glass")
02local Delay = workspace.Breakable_Glass:WaitForChild("DelayOfSpawnAndDeb")
03local Particle = workspace:WaitForChild("Breakable_Glass").GlassShatter
04local shatter = game.ReplicatedStorage.starter:WaitForChild("Shatter")
05local sound = Part.Sound
06local running = false
07 
08 
09 
10Part.Touched:Connect(function(hit)
11    if not running then running = true
12        if hit.Parent:FindFirstChild("LeftFoot") or
13            hit.Parent:FindFirstChild("RightFoot") then
14            hit.Parent:FindFirstChild("AnimateCoins").Disabled = false
15        Particle.Enabled = true
View all 28 lines...
0
da debounce is too long TheluaBanana 946 — 5y
0
Buti changed it and still dosen't work Freddan2006YT 88 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

Add a loop

0
What kind of loop while loop for loop?? Freddan2006YT 88 — 5y
Ad

Answer this question