Hey all! I have been stuck on fixing this debounce for awhile, when the player steps on it it fires twice (in console, print(vb) fires twice)
Here is the code:
```
local Touching
local Debounce = false
CurrentPath.Touched:Connect(function(Hit)
CurrentPath.CanTouch = false
if Debounce == true then
return
end
Debounce = true
if Touching == true then
Debounce = false
CurrentPath.CanTouch = true
return
end
print("vb")
end)
```
As you can see, I’ve tried with a variable & with .CanTouch disabling and enabling, there is some other code but I have redacted it as I don’t think it is useful to help me solve this bug
If anyone wants to offer some support or wants to ask some questions, do please reply!