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

Assistance needed on my debounce script. It keeps repeating it self over and over?

Asked by
DDM_DD 6
3 years ago

even though my debounce script is an exact copy of a script that works it won't work it stills is repeating like this:

hi (24x)

heres my code:

debounce = false


script.Parent.Touched:Connect(function(hit)
    if not debounce then 
        debounce = true
    if hit.Parent:FindFirstChild("Humanoid") then
        print("hi")
        end
    end
        wait(5)
        debounce = false
    end)

1 answer

Log in to vote
0
Answered by 3 years ago

Typo. Simply fix this script by adding a local before debounce on line 1.

0
I've added a local but it still does not stop repeating DDM_DD 6 — 3y
0
nvm did some more testing and figured out it was only doing it after 5 seconds and i only need it once DDM_DD 6 — 3y
Ad

Answer this question